summaryrefslogtreecommitdiffstats
path: root/generic/tclTomMathDecls.h
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2019-12-12 21:02:48 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2019-12-12 21:02:48 (GMT)
commit3701dc242da9d094c718912294c32e0465818482 (patch)
tree327f9fcc6150645aa066b55f2aa4e488ba760937 /generic/tclTomMathDecls.h
parentdb4a693d72766bc7a355c1012d5bcd0f12841c5b (diff)
downloadtcl-3701dc242da9d094c718912294c32e0465818482.zip
tcl-3701dc242da9d094c718912294c32e0465818482.tar.gz
tcl-3701dc242da9d094c718912294c32e0465818482.tar.bz2
Add 3 (libtommath) functions to the stub table. Will be added to 8.7 too, through TIP #538
Diffstat (limited to 'generic/tclTomMathDecls.h')
-rw-r--r--generic/tclTomMathDecls.h27
1 files changed, 18 insertions, 9 deletions
diff --git a/generic/tclTomMathDecls.h b/generic/tclTomMathDecls.h
index 3436798..6991643 100644
--- a/generic/tclTomMathDecls.h
+++ b/generic/tclTomMathDecls.h
@@ -72,6 +72,7 @@
#define mp_expt_d TclBN_mp_expt_d
#define mp_expt_d_ex TclBN_mp_expt_d_ex
#define mp_expt_u32 TclBN_mp_expt_d
+#define mp_get_mag_ull TclBN_mp_get_mag_ull
#define mp_grow TclBN_mp_grow
#define mp_init TclBN_mp_init
#define mp_init_copy TclBN_mp_init_copy
@@ -93,6 +94,7 @@
#define mp_rshd TclBN_mp_rshd
#define mp_set TclBN_mp_set
#define mp_set_int(a,b) (TclBN_mp_set_int(a,(unsigned int)(b)),MP_OKAY)
+#define mp_set_ll TclBN_mp_set_ll
#define mp_set_long(a,b) (TclBN_mp_set_int(a,b),MP_OKAY)
#define mp_set_ul(a,b) (void)TclBN_mp_set_int(a,b)
#define mp_set_ull TclBN_mp_set_ull
@@ -323,8 +325,10 @@ EXTERN mp_err TclBN_mp_expt_d_ex(const mp_int *a, mp_digit b,
mp_int *c, int fast);
/* 68 */
EXTERN void TclBN_mp_set_ull(mp_int *a, Tcl_WideUInt i);
-/* Slot 69 is reserved */
-/* Slot 70 is reserved */
+/* 69 */
+EXTERN Tcl_WideUInt TclBN_mp_get_mag_ull(const mp_int *a);
+/* 70 */
+EXTERN void TclBN_mp_set_ll(mp_int *a, Tcl_WideInt i);
/* Slot 71 is reserved */
/* Slot 72 is reserved */
/* 73 */
@@ -343,7 +347,9 @@ EXTERN mp_err TclBN_mp_signed_rsh(const mp_int *a, int b,
/* 78 */
EXTERN int TclBN_mp_to_ubin(const mp_int *a, unsigned char *buf,
size_t maxlen, size_t *written);
-/* Slot 79 is reserved */
+/* 79 */
+EXTERN mp_err TclBN_mp_div_ld(const mp_int *a, Tcl_WideUInt b,
+ mp_int *q, Tcl_WideUInt *r);
/* 80 */
EXTERN int TclBN_mp_to_radix(const mp_int *a, char *str,
size_t maxlen, size_t *written, int radix);
@@ -421,8 +427,8 @@ typedef struct TclTomMathStubs {
int (*tclBNInitBignumFromWideUInt) (mp_int *bignum, Tcl_WideUInt initVal); /* 66 */
mp_err (*tclBN_mp_expt_d_ex) (const mp_int *a, mp_digit b, mp_int *c, int fast); /* 67 */
void (*tclBN_mp_set_ull) (mp_int *a, Tcl_WideUInt i); /* 68 */
- void (*reserved69)(void);
- void (*reserved70)(void);
+ Tcl_WideUInt (*tclBN_mp_get_mag_ull) (const mp_int *a); /* 69 */
+ void (*tclBN_mp_set_ll) (mp_int *a, Tcl_WideInt i); /* 70 */
void (*reserved71)(void);
void (*reserved72)(void);
mp_err (*tclBN_mp_tc_and) (const mp_int *a, const mp_int *b, mp_int *c); /* 73 */
@@ -431,7 +437,7 @@ typedef struct TclTomMathStubs {
mp_err (*tclBN_mp_signed_rsh) (const mp_int *a, int b, mp_int *c); /* 76 */
void (*reserved77)(void);
int (*tclBN_mp_to_ubin) (const mp_int *a, unsigned char *buf, size_t maxlen, size_t *written); /* 78 */
- void (*reserved79)(void);
+ mp_err (*tclBN_mp_div_ld) (const mp_int *a, Tcl_WideUInt b, mp_int *q, Tcl_WideUInt *r); /* 79 */
int (*tclBN_mp_to_radix) (const mp_int *a, char *str, size_t maxlen, size_t *written, int radix); /* 80 */
} TclTomMathStubs;
@@ -585,8 +591,10 @@ extern const TclTomMathStubs *tclTomMathStubsPtr;
(tclTomMathStubsPtr->tclBN_mp_expt_d_ex) /* 67 */
#define TclBN_mp_set_ull \
(tclTomMathStubsPtr->tclBN_mp_set_ull) /* 68 */
-/* Slot 69 is reserved */
-/* Slot 70 is reserved */
+#define TclBN_mp_get_mag_ull \
+ (tclTomMathStubsPtr->tclBN_mp_get_mag_ull) /* 69 */
+#define TclBN_mp_set_ll \
+ (tclTomMathStubsPtr->tclBN_mp_set_ll) /* 70 */
/* Slot 71 is reserved */
/* Slot 72 is reserved */
#define TclBN_mp_tc_and \
@@ -600,7 +608,8 @@ extern const TclTomMathStubs *tclTomMathStubsPtr;
/* Slot 77 is reserved */
#define TclBN_mp_to_ubin \
(tclTomMathStubsPtr->tclBN_mp_to_ubin) /* 78 */
-/* Slot 79 is reserved */
+#define TclBN_mp_div_ld \
+ (tclTomMathStubsPtr->tclBN_mp_div_ld) /* 79 */
#define TclBN_mp_to_radix \
(tclTomMathStubsPtr->tclBN_mp_to_radix) /* 80 */