Commit df8fcb0e4bdc6d717e71452b033fce4f14e9af07

Daniel Mendler 2019-04-09T11:18:23

add MP_DEPRECATED macro

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
diff --git a/tommath_private.h b/tommath_private.h
index 2377e17..606ba29 100644
--- a/tommath_private.h
+++ b/tommath_private.h
@@ -10,6 +10,14 @@
 extern "C" {
 #endif
 
+#if defined(__GNUC__) && (__GNUC__ * 100 + __GNUC_MINOR__ >= 301)
+#  define MP_DEPRECATED(x) __attribute__((deprecated("replaced by " #x)))
+#elif defined(_MSC_VER) && _MSC_VER >= 1500
+#  define MP_DEPRECATED(x) __declspec(deprecated("replaced by " #x))
+#else
+#  define MP_DEPRECATED
+#endif
+
 /* define heap macros */
 #ifndef MP_MALLOC
 /* default to libc stuff */