summaryrefslogtreecommitdiffstats
path: root/generic/tclTomMathDecls.h
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2019-10-30 20:33:45 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2019-10-30 20:33:45 (GMT)
commite52ace05d39636e857f167ed51382cbfbbd22687 (patch)
tree211903eab3d92a4e261eac879dcf6c48d64ad5c7 /generic/tclTomMathDecls.h
parent047122995db63a48e068e04717d715acfea1c0a3 (diff)
downloadtcl-e52ace05d39636e857f167ed51382cbfbbd22687.zip
tcl-e52ace05d39636e857f167ed51382cbfbbd22687.tar.gz
tcl-e52ace05d39636e857f167ed51382cbfbbd22687.tar.bz2
Change mp_isodd() (back) from libtommath stub entry to macro. libtommath changed it back to macro too in its master branch, we better do the same.
Better usage of mp_isneg() macro, in stead of directly comparing sign with MP_NEG/MP_ZPOS.
Diffstat (limited to 'generic/tclTomMathDecls.h')
-rw-r--r--generic/tclTomMathDecls.h13
1 files changed, 3 insertions, 10 deletions
diff --git a/generic/tclTomMathDecls.h b/generic/tclTomMathDecls.h
index 92bb512..9131041 100644
--- a/generic/tclTomMathDecls.h
+++ b/generic/tclTomMathDecls.h
@@ -80,7 +80,6 @@
#define mp_init_set TclBN_mp_init_set
#define mp_init_set_int TclBN_mp_init_set_int
#define mp_init_size TclBN_mp_init_size
-#define mp_isodd TclBN_mp_isodd
#define mp_lshd TclBN_mp_lshd
#define mp_mod TclBN_mp_mod
#define mp_mod_2d TclBN_mp_mod_2d
@@ -326,8 +325,7 @@ EXTERN mp_err TclBN_mp_expt_d_ex(const mp_int *a, mp_digit b,
/* Slot 69 is reserved */
/* Slot 70 is reserved */
/* Slot 71 is reserved */
-/* 72 */
-EXTERN mp_bool TclBN_mp_isodd(const mp_int *a);
+/* Slot 72 is reserved */
/* 73 */
EXTERN mp_err TclBN_mp_tc_and(const mp_int *a, const mp_int *b,
mp_int *c);
@@ -426,7 +424,7 @@ typedef struct TclTomMathStubs {
void (*reserved69)(void);
void (*reserved70)(void);
void (*reserved71)(void);
- mp_bool (*tclBN_mp_isodd) (const mp_int *a); /* 72 */
+ void (*reserved72)(void);
mp_err (*tclBN_mp_tc_and) (const mp_int *a, const mp_int *b, mp_int *c); /* 73 */
mp_err (*tclBN_mp_tc_or) (const mp_int *a, const mp_int *b, mp_int *c); /* 74 */
mp_err (*tclBN_mp_tc_xor) (const mp_int *a, const mp_int *b, mp_int *c); /* 75 */
@@ -589,8 +587,7 @@ extern const TclTomMathStubs *tclTomMathStubsPtr;
/* Slot 69 is reserved */
/* Slot 70 is reserved */
/* Slot 71 is reserved */
-#define TclBN_mp_isodd \
- (tclTomMathStubsPtr->tclBN_mp_isodd) /* 72 */
+/* Slot 72 is reserved */
#define TclBN_mp_tc_and \
(tclTomMathStubsPtr->tclBN_mp_tc_and) /* 73 */
#define TclBN_mp_tc_or \
@@ -611,10 +608,6 @@ extern const TclTomMathStubs *tclTomMathStubsPtr;
/* !END!: Do not edit above this line. */
-#undef mp_isodd
-#define mp_isodd(a) (((a)->used > 0 && (((a)->dp[0] & 1) == 1)) ? MP_YES : MP_NO)
-#define mp_iseven(a) (((a)->used == 0 || (((a)->dp[0] & 1) == 0)) ? MP_YES : MP_NO)
-
#undef TCL_STORAGE_CLASS
#define TCL_STORAGE_CLASS DLLIMPORT