diff options
author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2019-06-14 21:48:00 (GMT) |
---|---|---|
committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2019-06-14 21:48:00 (GMT) |
commit | 15e17d01d57f28aa3ccb9adcc344937c4b5a34e0 (patch) | |
tree | 80050a4af1fcd9e60dbc7cf57462a7ed505974c9 /generic/tclStubInit.c | |
parent | e69d76af16939ec4327b1793f8a2cb358a141972 (diff) | |
parent | db7fa65dce753b80d5f2a87799aabd481e9144a2 (diff) | |
download | tcl-15e17d01d57f28aa3ccb9adcc344937c4b5a34e0.zip tcl-15e17d01d57f28aa3ccb9adcc344937c4b5a34e0.tar.gz tcl-15e17d01d57f28aa3ccb9adcc344937c4b5a34e0.tar.bz2 |
Latest libtommath's "develop" branch adapted for Tcl 8.6. And Tcl 8.6 adapted for changes in libtommath
Diffstat (limited to 'generic/tclStubInit.c')
-rw-r--r-- | generic/tclStubInit.c | 27 |
1 files changed, 26 insertions, 1 deletions
diff --git a/generic/tclStubInit.c b/generic/tclStubInit.c index bf05158..646ccf9 100644 --- a/generic/tclStubInit.c +++ b/generic/tclStubInit.c @@ -10,7 +10,7 @@ */ #include "tclInt.h" -#include "tommath.h" +#include "tommath_private.h" #ifdef __CYGWIN__ # include <wchar.h> @@ -69,6 +69,31 @@ static int TclSockMinimumBuffersOld(int sock, int size) } #endif +static MP_SET_UNSIGNED(bn_mp_set_ull, unsigned long long) + + +int TclBN_mp_set_long(mp_int *a, unsigned long i) +{ + bn_mp_set_ull(a, i); + return MP_OKAY; +} + +int TclBN_mp_set_int(mp_int *a, unsigned long i) +{ + return TclBN_mp_set_long(a, i); +} + +int TclBN_mp_init_set_int(mp_int *a, unsigned long i) +{ + mp_init(a); + return TclBN_mp_set_long(a, i); +} + +int TclBN_mp_expt_d_ex(const mp_int *a, mp_digit b, mp_int *c, int fast) +{ + return mp_expt_d(a, b, c); +} + #define TclSetStartupScriptPath setStartupScriptPath static void TclSetStartupScriptPath(Tcl_Obj *path) { |