diff options
author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2019-03-08 19:54:37 (GMT) |
---|---|---|
committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2019-03-08 19:54:37 (GMT) |
commit | 2cba0bf57340c299b9b51681a44f37d95787a47d (patch) | |
tree | faec5bc1c3b79bed7beeb9bb81aad166e3d29946 /generic/tclTomMathDecls.h | |
parent | 3e074a01a25b4f670b3558513ce29e29b20a9357 (diff) | |
download | tcl-2cba0bf57340c299b9b51681a44f37d95787a47d.zip tcl-2cba0bf57340c299b9b51681a44f37d95787a47d.tar.gz tcl-2cba0bf57340c299b9b51681a44f37d95787a47d.tar.bz2 |
Use mp_get_bit() instead of mp_iseven()/mp_isodd(): Those latter functions are macro's currently, but will be real function in next libtommath. Bad idea for Tcl to depend on ...
Diffstat (limited to 'generic/tclTomMathDecls.h')
-rw-r--r-- | generic/tclTomMathDecls.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/generic/tclTomMathDecls.h b/generic/tclTomMathDecls.h index 1e402fd..c82d70d 100644 --- a/generic/tclTomMathDecls.h +++ b/generic/tclTomMathDecls.h @@ -74,6 +74,7 @@ #define mp_exch TclBN_mp_exch #define mp_expt_d TclBN_mp_expt_d #define mp_expt_d_ex TclBN_mp_expt_d_ex +#define mp_get_bit TclBN_mp_get_bit #define mp_get_int TclBN_mp_get_int #define mp_get_long TclBN_mp_get_long #define mp_get_long_long TclBN_mp_get_long_long @@ -340,6 +341,8 @@ EXTERN int TclBN_mp_tc_xor(const mp_int *a, const mp_int *b, mp_int *c); /* 76 */ EXTERN int TclBN_mp_tc_div_2d(const mp_int *a, int b, mp_int *c); +/* 77 */ +EXTERN int TclBN_mp_get_bit(const mp_int *a, int b); typedef struct TclTomMathStubs { int magic; @@ -422,6 +425,7 @@ typedef struct TclTomMathStubs { int (*tclBN_mp_tc_or) (const mp_int *a, const mp_int *b, mp_int *c); /* 74 */ int (*tclBN_mp_tc_xor) (const mp_int *a, const mp_int *b, mp_int *c); /* 75 */ int (*tclBN_mp_tc_div_2d) (const mp_int *a, int b, mp_int *c); /* 76 */ + int (*tclBN_mp_get_bit) (const mp_int *a, int b); /* 77 */ } TclTomMathStubs; extern const TclTomMathStubs *tclTomMathStubsPtr; @@ -590,6 +594,8 @@ extern const TclTomMathStubs *tclTomMathStubsPtr; (tclTomMathStubsPtr->tclBN_mp_tc_xor) /* 75 */ #define TclBN_mp_tc_div_2d \ (tclTomMathStubsPtr->tclBN_mp_tc_div_2d) /* 76 */ +#define TclBN_mp_get_bit \ + (tclTomMathStubsPtr->tclBN_mp_get_bit) /* 77 */ #endif /* defined(USE_TCL_STUBS) */ |