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 8907462..20fa442 100644 --- a/generic/tclTomMathDecls.h +++ b/generic/tclTomMathDecls.h @@ -96,6 +96,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 @@ -331,7 +332,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); /* Slot 73 is reserved */ /* Slot 74 is reserved */ /* Slot 75 is reserved */ @@ -424,7 +426,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 */ void (*reserved73)(void); void (*reserved74)(void); void (*reserved75)(void); @@ -573,7 +575,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 */ /* Slot 73 is reserved */ /* Slot 74 is reserved */ /* Slot 75 is reserved */ @@ -591,6 +594,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 |
