Skip to content

Commit

Permalink
Add SECP256K1_DEPRECATED attribute for marking API parts as deprecated
Browse files Browse the repository at this point in the history
  • Loading branch information
real-or-random committed Mar 17, 2022
1 parent ac83be3 commit 3db0560
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions include/secp256k1.h
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,17 @@ typedef int (*secp256k1_nonce_function)(
# define SECP256K1_ARG_NONNULL(_x)
# endif

/** Attribute for marking functions, types, and variables as deprecated */
#if !defined(SECP256K1_BUILD) && defined(__has_attribute)
# if __has_attribute(__deprecated__)
# define SECP256K1_DEPRECATED(_msg) __attribute__ ((__deprecated__(_msg)))
# else
# define SECP256K1_DEPRECATED(_msg)
# endif
#else
# define SECP256K1_DEPRECATED(_msg)
#endif

/** All flags' lower 8 bits indicate what they're for. Do not use directly. */
#define SECP256K1_FLAGS_TYPE_MASK ((1 << 8) - 1)
#define SECP256K1_FLAGS_TYPE_CONTEXT (1 << 0)
Expand Down

0 comments on commit 3db0560

Please sign in to comment.