File tree 2 files changed +14
-11
lines changed 2 files changed +14
-11
lines changed Original file line number Diff line number Diff line change @@ -148,10 +148,21 @@ typedef struct {
148
148
/* callback for mp_prime_random, should fill dst with random bytes and return how many read [upto len] */
149
149
typedef int ltm_prime_callback (unsigned char * dst , int len , void * dat );
150
150
151
+ #if defined(__GNUC__ ) && (__GNUC__ * 100 + __GNUC_MINOR__ >= 301 )
152
+ # define MP_DEPRECATED (x ) __attribute__((deprecated("replaced by " #x)))
153
+ # define _MP_DEPRECATED_PRAGMA (s ) _Pragma(#s)
154
+ # define MP_DEPRECATED_PRAGMA (s ) _MP_DEPRECATED_PRAGMA(GCC warning s)
155
+ #elif defined(_MSC_VER ) && _MSC_VER >= 1500
156
+ # define MP_DEPRECATED (x ) __declspec(deprecated("replaced by " #x))
157
+ # define MP_DEPRECATED_PRAGMA (s ) __pragma(message(s))
158
+ #else
159
+ # define MP_DEPRECATED
160
+ # define MP_DEPRECATED_PRAGMA (s )
161
+ #endif
151
162
152
- #define USED (m ) ((m)->used)
153
- #define DIGIT (m , k ) ((m)->dp[(k)])
154
- #define SIGN (m ) ((m)->sign)
163
+ #define USED (m ) (MP_DEPRECATED_PRAGMA("USED macro is deprecated, use z->used instead") (m)->used)
164
+ #define DIGIT (m , k ) (MP_DEPRECATED_PRAGMA("DIGIT macro is deprecated, use z->dp instead") (m)->dp[(k)])
165
+ #define SIGN (m ) (MP_DEPRECATED_PRAGMA("SIGN macro is deprecated, use z->sign instead") (m)->sign)
155
166
156
167
/* error code to char* string */
157
168
const char * mp_error_to_string (int code );
Original file line number Diff line number Diff line change 10
10
extern "C" {
11
11
#endif
12
12
13
- #if defined(__GNUC__ ) && (__GNUC__ * 100 + __GNUC_MINOR__ >= 301 )
14
- # define MP_DEPRECATED (x ) __attribute__((deprecated("replaced by " #x)))
15
- #elif defined(_MSC_VER ) && _MSC_VER >= 1500
16
- # define MP_DEPRECATED (x ) __declspec(deprecated("replaced by " #x))
17
- #else
18
- # define MP_DEPRECATED
19
- #endif
20
-
21
13
/* define heap macros */
22
14
#ifndef MP_MALLOC
23
15
/* default to libc stuff */
You can’t perform that action at this time.
0 commit comments