summaryrefslogtreecommitdiffstats
path: root/generic
diff options
context:
space:
mode:
authordkf <donal.k.fellows@manchester.ac.uk>2015-10-28 21:15:21 (GMT)
committerdkf <donal.k.fellows@manchester.ac.uk>2015-10-28 21:15:21 (GMT)
commitd2b7a7797a402493c3e257f8c83b27111c0770c0 (patch)
tree17060872d18b632eaaef229b4626c5e3d1e6afcc /generic
parentacc449dd107dae0b0382540ae810a3daa6e104c2 (diff)
downloadtcl-d2b7a7797a402493c3e257f8c83b27111c0770c0.zip
tcl-d2b7a7797a402493c3e257f8c83b27111c0770c0.tar.gz
tcl-d2b7a7797a402493c3e257f8c83b27111c0770c0.tar.bz2
Expose some of the TclBN operations through the internal API, so clients of the bignum code don't need to use tclTomMath.h directly.
Diffstat (limited to 'generic')
-rw-r--r--generic/tclInt.h7
-rw-r--r--generic/tclTomMath.decls23
2 files changed, 20 insertions, 10 deletions
diff --git a/generic/tclInt.h b/generic/tclInt.h
index 356d250..f9d2edf 100644
--- a/generic/tclInt.h
+++ b/generic/tclInt.h
@@ -4435,17 +4435,12 @@ MODULE_SCOPE void TclDbInitNewObj(Tcl_Obj *objPtr, const char *file,
/*
*----------------------------------------------------------------------
*
- * Core procedures added to libtommath for bignum manipulation.
+ * Core procedure added to libtommath for bignum manipulation.
*
*----------------------------------------------------------------------
*/
MODULE_SCOPE Tcl_PackageInitProc TclTommath_Init;
-MODULE_SCOPE void TclBNInitBignumFromLong(mp_int *bignum, long initVal);
-MODULE_SCOPE void TclBNInitBignumFromWideInt(mp_int *bignum,
- Tcl_WideInt initVal);
-MODULE_SCOPE void TclBNInitBignumFromWideUInt(mp_int *bignum,
- Tcl_WideUInt initVal);
/*
*----------------------------------------------------------------------
diff --git a/generic/tclTomMath.decls b/generic/tclTomMath.decls
index ea3abb1..8d9e05f 100644
--- a/generic/tclTomMath.decls
+++ b/generic/tclTomMath.decls
@@ -1,9 +1,8 @@
# tclTomMath.decls --
#
-# This file contains the declarations for the functions in
-# 'libtommath' that are contained within the Tcl library.
-# This file is used to generate the 'tclTomMathDecls.h' and
-# 'tclTomMathStub.c' files.
+# This file contains the declarations for the functions in 'libtommath'
+# that are contained within the Tcl library. This file is used to
+# generate the 'tclTomMathDecls.h' and 'tclTomMathStub.c' files.
#
# If you edit this file, advance the revision number (and the epoch
# if the new stubs are not backward compatible) in tclTomMathDecls.h
@@ -221,3 +220,19 @@ declare 62 {
declare 63 {
int TclBN_mp_cnt_lsb(const mp_int *a)
}
+
+# Formerly internal API to allow initialisation of bignums without knowing the
+# typedefs of how a bignum works internally.
+declare 64 {
+ void TclBNInitBignumFromLong(mp_int *bignum, long initVal)
+}
+declare 65 {
+ void TclBNInitBignumFromWideInt(mp_int *bignum, Tcl_WideInt initVal)
+}
+declare 66 {
+ void TclBNInitBignumFromWideUInt(mp_int *bignum, Tcl_WideUInt initVal)
+}
+
+# Local Variables:
+# mode: tcl
+# End: