Commit 632601f4055d37b21a136171632bd7f9dc1cf364

Daniel Mendler 2019-04-13T17:34:11

MP_WARRAY is an internal macro

diff --git a/tommath.h b/tommath.h
index 7943084..bd20597 100644
--- a/tommath.h
+++ b/tommath.h
@@ -136,7 +136,8 @@ extern int KARATSUBA_MUL_CUTOFF,
 #endif
 
 /* size of comba arrays, should be at least 2 * 2**(BITS_PER_WORD - BITS_PER_DIGIT*2) */
-#define MP_WARRAY               (1u << (((CHAR_BIT * sizeof(mp_word)) - (2 * MP_DIGIT_BIT)) + 1))
+#define _MP_WARRAY_PRIVATE (1u << (((CHAR_BIT * sizeof(mp_word)) - (2 * MP_DIGIT_BIT)) + 1))
+#define MP_WARRAY (MP_DEPRECATED_PRAGMA("MP_WARRAY is an internal macro") _MP_WARRAY_PRIVATE)
 
 /* the infamous mp_int structure */
 typedef struct  {
diff --git a/tommath_private.h b/tommath_private.h
index 03f93f0..63e6034 100644
--- a/tommath_private.h
+++ b/tommath_private.h
@@ -25,6 +25,12 @@ extern void *MP_CALLOC(size_t nmemb, size_t size);
 extern void MP_FREE(void *mem, size_t size);
 #endif
 
+/* TODO: Remove _MP_WARRAY_PRIVATE as soon as deprecated
+ * MP_WARRAY is removed from tommath.h
+*/
+#undef MP_WARRAY
+#define MP_WARRAY _MP_WARRAY_PRIVATE
+
 #define MP_MIN(x, y) (((x) < (y)) ? (x) : (y))
 #define MP_MAX(x, y) (((x) > (y)) ? (x) : (y))