UltrafastSecp256k1 3.50.0
Ultra high-performance secp256k1 elliptic curve cryptography library
Loading...
Searching...
No Matches
ufsecp_version.h
Go to the documentation of this file.
1/* ============================================================================
2 * UltrafastSecp256k1 -- Version & ABI Compatibility
3 * ============================================================================
4 * NOTE: When building with CMake the real header is generated from
5 * ufsecp_version.h.in and placed in the build tree (takes priority).
6 * This source-tree copy contains dev placeholders for non-CMake use.
7 * ============================================================================
8 * RULES:
9 * UFSECP_VERSION_MAJOR bump -> ABI breaking (struct layout, removed funcs)
10 * UFSECP_VERSION_MINOR bump -> ABI compatible (new funcs only)
11 * UFSECP_VERSION_PATCH bump -> ABI compatible (bugfixes only)
12 * UFSECP_ABI_VERSION bump -> only on ABI-incompatible changes
13 *
14 * Clients should check: ufsecp_abi_version() == expected_abi
15 * ============================================================================ */
16
17#ifndef UFSECP_VERSION_H
18#define UFSECP_VERSION_H
19
20#ifdef __cplusplus
21extern "C" {
22#endif
23
24/* -- Compile-time version (dev placeholder -- CMake builds use generated header) */
25
26#define UFSECP_VERSION_MAJOR 0
27#define UFSECP_VERSION_MINOR 0
28#define UFSECP_VERSION_PATCH 0
29
31#define UFSECP_VERSION_PACKED \
32 ((UFSECP_VERSION_MAJOR << 16) | (UFSECP_VERSION_MINOR << 8) | UFSECP_VERSION_PATCH)
33
34#define UFSECP_VERSION_STRING "0.0.0-dev"
35
36/* -- ABI version (incremented ONLY on binary-incompatible changes) ---------- */
37
38#define UFSECP_ABI_VERSION 1
39
40/* -- Runtime queries -------------------------------------------------------- */
41
42#ifndef UFSECP_API
43 #if defined(_WIN32) || defined(__CYGWIN__)
44 #ifdef UFSECP_BUILDING
45 #define UFSECP_API __declspec(dllexport)
46 #elif defined(UFSECP_STATIC_LIB)
47 #define UFSECP_API
48 #else
49 #define UFSECP_API __declspec(dllimport)
50 #endif
51 #elif __GNUC__ >= 4
52 #define UFSECP_API __attribute__((visibility("default")))
53 #else
54 #define UFSECP_API
55 #endif
56#endif
57
59UFSECP_API unsigned int ufsecp_version(void);
60
62UFSECP_API unsigned int ufsecp_abi_version(void);
63
65UFSECP_API const char* ufsecp_version_string(void);
66
67#ifdef __cplusplus
68}
69#endif
70
71#endif /* UFSECP_VERSION_H */
UFSECP_API unsigned int ufsecp_version(void)
UFSECP_API const char * ufsecp_version_string(void)
#define UFSECP_API
UFSECP_API unsigned int ufsecp_abi_version(void)