diff options
Diffstat (limited to 'generic/tclTomMathDecls.h')
| -rw-r--r-- | generic/tclTomMathDecls.h | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/generic/tclTomMathDecls.h b/generic/tclTomMathDecls.h index 7c8c5aa..62be342 100644 --- a/generic/tclTomMathDecls.h +++ b/generic/tclTomMathDecls.h @@ -95,6 +95,7 @@ #define s_mp_karatsuba_mul TclBN_mp_karatsuba_mul #define mp_karatsuba_sqr TclBN_mp_karatsuba_sqr #define s_mp_karatsuba_sqr TclBN_mp_karatsuba_sqr +#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 @@ -360,7 +361,8 @@ EXTERN Tcl_WideUInt TclBN_mp_get_mag_ull(const mp_int *a); EXTERN void TclBN_mp_set_ul(mp_int *a, unsigned long i); /* 71 */ EXTERN unsigned long TclBN_mp_get_mag_ul(const mp_int *a); -/* Slot 72 is reserved */ +/* 72 */ +EXTERN mp_bool TclBN_mp_isodd(const mp_int *a); /* 73 */ EXTERN mp_err TclBN_mp_tc_and(const mp_int *a, const mp_int *b, mp_int *c); @@ -461,7 +463,7 @@ typedef struct TclTomMathStubs { Tcl_WideUInt (*tclBN_mp_get_mag_ull) (const mp_int *a); /* 69 */ void (*tclBN_mp_set_ul) (mp_int *a, unsigned long i); /* 70 */ unsigned long (*tclBN_mp_get_mag_ul) (const mp_int *a); /* 71 */ - void (*reserved72)(void); + mp_bool (*tclBN_mp_isodd) (const mp_int *a); /* 72 */ 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 */ @@ -628,7 +630,8 @@ extern const TclTomMathStubs *tclTomMathStubsPtr; (tclTomMathStubsPtr->tclBN_mp_set_ul) /* 70 */ #define TclBN_mp_get_mag_ul \ (tclTomMathStubsPtr->tclBN_mp_get_mag_ul) /* 71 */ -/* Slot 72 is reserved */ +#define TclBN_mp_isodd \ + (tclTomMathStubsPtr->tclBN_mp_isodd) /* 72 */ #define TclBN_mp_tc_and \ (tclTomMathStubsPtr->tclBN_mp_tc_and) /* 73 */ #define TclBN_mp_tc_or \ @@ -650,6 +653,10 @@ 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 |
