diff options
author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2019-03-10 21:16:06 (GMT) |
---|---|---|
committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2019-03-10 21:16:06 (GMT) |
commit | 0bd8e4a634e88f8415e8904c7e5ed4c87a0243af (patch) | |
tree | c346e8fe0aafcbb4b97991d74487c0da18db72f0 /generic/tclTomMathDecls.h | |
parent | 919d62dcd3d557c7976c331687ef9e8bbf6560c9 (diff) | |
download | tcl-0bd8e4a634e88f8415e8904c7e5ed4c87a0243af.zip tcl-0bd8e4a634e88f8415e8904c7e5ed4c87a0243af.tar.gz tcl-0bd8e4a634e88f8415e8904c7e5ed4c87a0243af.tar.bz2 |
Make internal libtommath symbols MODULE_SCOPE, and remove them from the stub table: They are not supposed to be called by extensions.
Diffstat (limited to 'generic/tclTomMathDecls.h')
-rw-r--r-- | generic/tclTomMathDecls.h | 112 |
1 files changed, 51 insertions, 61 deletions
diff --git a/generic/tclTomMathDecls.h b/generic/tclTomMathDecls.h index 26159dc..6cabe85 100644 --- a/generic/tclTomMathDecls.h +++ b/generic/tclTomMathDecls.h @@ -125,6 +125,24 @@ #define s_mp_sqr TclBN_s_mp_sqr #define s_mp_sub TclBN_s_mp_sub +MODULE_SCOPE void TclBN_reverse(unsigned char *s, int len); +MODULE_SCOPE int TclBN_fast_s_mp_mul_digs(const mp_int *a, + const mp_int *b, mp_int *c, int digs); +MODULE_SCOPE int TclBN_fast_s_mp_sqr(const mp_int *a, mp_int *b); +MODULE_SCOPE int TclBN_mp_karatsuba_mul(const mp_int *a, + const mp_int *b, mp_int *c); +MODULE_SCOPE int TclBN_mp_karatsuba_sqr(const mp_int *a, mp_int *b); +MODULE_SCOPE int TclBN_mp_toom_mul(const mp_int *a, const mp_int *b, + mp_int *c); +MODULE_SCOPE int TclBN_mp_toom_sqr(const mp_int *a, mp_int *b); +MODULE_SCOPE int TclBN_s_mp_add(const mp_int *a, const mp_int *b, + mp_int *c); +MODULE_SCOPE int TclBN_s_mp_mul_digs(const mp_int *a, const mp_int *b, + mp_int *c, int digs); +MODULE_SCOPE int TclBN_s_mp_sqr(const mp_int *a, mp_int *b); +MODULE_SCOPE int TclBN_s_mp_sub(const mp_int *a, const mp_int *b, + mp_int *c); + #undef TCL_STORAGE_CLASS #ifdef BUILD_tcl # define TCL_STORAGE_CLASS DLLEXPORT @@ -272,34 +290,17 @@ EXTERN int TclBN_mp_xor(const mp_int *a, const mp_int *b, mp_int *c); /* 49 */ EXTERN void TclBN_mp_zero(mp_int *a); -/* 50 */ -EXTERN void TclBN_reverse(unsigned char *s, int len); -/* 51 */ -EXTERN int TclBN_fast_s_mp_mul_digs(const mp_int *a, - const mp_int *b, mp_int *c, int digs); -/* 52 */ -EXTERN int TclBN_fast_s_mp_sqr(const mp_int *a, mp_int *b); -/* 53 */ -EXTERN int TclBN_mp_karatsuba_mul(const mp_int *a, - const mp_int *b, mp_int *c); -/* 54 */ -EXTERN int TclBN_mp_karatsuba_sqr(const mp_int *a, mp_int *b); -/* 55 */ -EXTERN int TclBN_mp_toom_mul(const mp_int *a, const mp_int *b, - mp_int *c); -/* 56 */ -EXTERN int TclBN_mp_toom_sqr(const mp_int *a, mp_int *b); -/* 57 */ -EXTERN int TclBN_s_mp_add(const mp_int *a, const mp_int *b, - mp_int *c); -/* 58 */ -EXTERN int TclBN_s_mp_mul_digs(const mp_int *a, const mp_int *b, - mp_int *c, int digs); -/* 59 */ -EXTERN int TclBN_s_mp_sqr(const mp_int *a, mp_int *b); -/* 60 */ -EXTERN int TclBN_s_mp_sub(const mp_int *a, const mp_int *b, - mp_int *c); +/* Slot 50 is reserved */ +/* Slot 51 is reserved */ +/* Slot 52 is reserved */ +/* Slot 53 is reserved */ +/* Slot 54 is reserved */ +/* Slot 55 is reserved */ +/* Slot 56 is reserved */ +/* Slot 57 is reserved */ +/* Slot 58 is reserved */ +/* Slot 59 is reserved */ +/* Slot 60 is reserved */ /* 61 */ EXTERN int TclBN_mp_init_set_int(mp_int *a, unsigned long i); /* 62 */ @@ -390,17 +391,17 @@ typedef struct TclTomMathStubs { int (*tclBN_mp_unsigned_bin_size) (const mp_int *a); /* 47 */ int (*tclBN_mp_xor) (const mp_int *a, const mp_int *b, mp_int *c); /* 48 */ void (*tclBN_mp_zero) (mp_int *a); /* 49 */ - void (*tclBN_reverse) (unsigned char *s, int len); /* 50 */ - int (*tclBN_fast_s_mp_mul_digs) (const mp_int *a, const mp_int *b, mp_int *c, int digs); /* 51 */ - int (*tclBN_fast_s_mp_sqr) (const mp_int *a, mp_int *b); /* 52 */ - int (*tclBN_mp_karatsuba_mul) (const mp_int *a, const mp_int *b, mp_int *c); /* 53 */ - int (*tclBN_mp_karatsuba_sqr) (const mp_int *a, mp_int *b); /* 54 */ - int (*tclBN_mp_toom_mul) (const mp_int *a, const mp_int *b, mp_int *c); /* 55 */ - int (*tclBN_mp_toom_sqr) (const mp_int *a, mp_int *b); /* 56 */ - int (*tclBN_s_mp_add) (const mp_int *a, const mp_int *b, mp_int *c); /* 57 */ - int (*tclBN_s_mp_mul_digs) (const mp_int *a, const mp_int *b, mp_int *c, int digs); /* 58 */ - int (*tclBN_s_mp_sqr) (const mp_int *a, mp_int *b); /* 59 */ - int (*tclBN_s_mp_sub) (const mp_int *a, const mp_int *b, mp_int *c); /* 60 */ + void (*reserved50)(void); + void (*reserved51)(void); + void (*reserved52)(void); + void (*reserved53)(void); + void (*reserved54)(void); + void (*reserved55)(void); + void (*reserved56)(void); + void (*reserved57)(void); + void (*reserved58)(void); + void (*reserved59)(void); + void (*reserved60)(void); int (*tclBN_mp_init_set_int) (mp_int *a, unsigned long i); /* 61 */ int (*tclBN_mp_set_int) (mp_int *a, unsigned long i); /* 62 */ int (*tclBN_mp_cnt_lsb) (const mp_int *a); /* 63 */ @@ -532,28 +533,17 @@ extern const TclTomMathStubs *tclTomMathStubsPtr; (tclTomMathStubsPtr->tclBN_mp_xor) /* 48 */ #define TclBN_mp_zero \ (tclTomMathStubsPtr->tclBN_mp_zero) /* 49 */ -#define TclBN_reverse \ - (tclTomMathStubsPtr->tclBN_reverse) /* 50 */ -#define TclBN_fast_s_mp_mul_digs \ - (tclTomMathStubsPtr->tclBN_fast_s_mp_mul_digs) /* 51 */ -#define TclBN_fast_s_mp_sqr \ - (tclTomMathStubsPtr->tclBN_fast_s_mp_sqr) /* 52 */ -#define TclBN_mp_karatsuba_mul \ - (tclTomMathStubsPtr->tclBN_mp_karatsuba_mul) /* 53 */ -#define TclBN_mp_karatsuba_sqr \ - (tclTomMathStubsPtr->tclBN_mp_karatsuba_sqr) /* 54 */ -#define TclBN_mp_toom_mul \ - (tclTomMathStubsPtr->tclBN_mp_toom_mul) /* 55 */ -#define TclBN_mp_toom_sqr \ - (tclTomMathStubsPtr->tclBN_mp_toom_sqr) /* 56 */ -#define TclBN_s_mp_add \ - (tclTomMathStubsPtr->tclBN_s_mp_add) /* 57 */ -#define TclBN_s_mp_mul_digs \ - (tclTomMathStubsPtr->tclBN_s_mp_mul_digs) /* 58 */ -#define TclBN_s_mp_sqr \ - (tclTomMathStubsPtr->tclBN_s_mp_sqr) /* 59 */ -#define TclBN_s_mp_sub \ - (tclTomMathStubsPtr->tclBN_s_mp_sub) /* 60 */ +/* Slot 50 is reserved */ +/* Slot 51 is reserved */ +/* Slot 52 is reserved */ +/* Slot 53 is reserved */ +/* Slot 54 is reserved */ +/* Slot 55 is reserved */ +/* Slot 56 is reserved */ +/* Slot 57 is reserved */ +/* Slot 58 is reserved */ +/* Slot 59 is reserved */ +/* Slot 60 is reserved */ #define TclBN_mp_init_set_int \ (tclTomMathStubsPtr->tclBN_mp_init_set_int) /* 61 */ #define TclBN_mp_set_int \ |