summaryrefslogtreecommitdiffstats
path: root/generic/tclStubInit.c
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2019-06-14 21:48:00 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2019-06-14 21:48:00 (GMT)
commit15e17d01d57f28aa3ccb9adcc344937c4b5a34e0 (patch)
tree80050a4af1fcd9e60dbc7cf57462a7ed505974c9 /generic/tclStubInit.c
parente69d76af16939ec4327b1793f8a2cb358a141972 (diff)
parentdb7fa65dce753b80d5f2a87799aabd481e9144a2 (diff)
downloadtcl-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.c27
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)
{