Skip to content

Commit 3db0560

Browse files
Add SECP256K1_DEPRECATED attribute for marking API parts as deprecated
1 parent ac83be3 commit 3db0560

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

include/secp256k1.h

+11
Original file line numberDiff line numberDiff line change
@@ -169,6 +169,17 @@ typedef int (*secp256k1_nonce_function)(
169169
# define SECP256K1_ARG_NONNULL(_x)
170170
# endif
171171

172+
/** Attribute for marking functions, types, and variables as deprecated */
173+
#if !defined(SECP256K1_BUILD) && defined(__has_attribute)
174+
# if __has_attribute(__deprecated__)
175+
# define SECP256K1_DEPRECATED(_msg) __attribute__ ((__deprecated__(_msg)))
176+
# else
177+
# define SECP256K1_DEPRECATED(_msg)
178+
# endif
179+
#else
180+
# define SECP256K1_DEPRECATED(_msg)
181+
#endif
182+
172183
/** All flags' lower 8 bits indicate what they're for. Do not use directly. */
173184
#define SECP256K1_FLAGS_TYPE_MASK ((1 << 8) - 1)
174185
#define SECP256K1_FLAGS_TYPE_CONTEXT (1 << 0)

0 commit comments

Comments
 (0)