diff options
author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2017-09-08 14:15:13 (GMT) |
---|---|---|
committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2017-09-08 14:15:13 (GMT) |
commit | b2446d8d4189bfbfe9103548ebf459f29089398e (patch) | |
tree | cdcbe1f7914fe91fdc459bb357195d82514df01c /libtommath/tommath.h | |
parent | e86e8a501d19fb5963200791c3b575648c00090c (diff) | |
download | tcl-b2446d8d4189bfbfe9103548ebf459f29089398e.zip tcl-b2446d8d4189bfbfe9103548ebf459f29089398e.tar.gz tcl-b2446d8d4189bfbfe9103548ebf459f29089398e.tar.bz2 |
Add some more functions from libtommath for availability within Tcl (mainly the 'long long' variants). Add more 'const' keywords there too.
Diffstat (limited to 'libtommath/tommath.h')
-rw-r--r-- | libtommath/tommath.h | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/libtommath/tommath.h b/libtommath/tommath.h index 7d92d97..a8c9e21 100644 --- a/libtommath/tommath.h +++ b/libtommath/tommath.h @@ -220,16 +220,16 @@ int mp_set_int(mp_int *a, unsigned long b); int mp_set_long(mp_int *a, unsigned long b); /* set a platform dependent unsigned long long value */ -int mp_set_long_long(mp_int *a, unsigned long long b); +int mp_set_long_long(mp_int *a, Tcl_WideUInt b); /* get a 32-bit value */ -unsigned long mp_get_int(mp_int * a); +unsigned long mp_get_int(const mp_int * a); /* get a platform dependent unsigned long value */ -unsigned long mp_get_long(mp_int * a); +unsigned long mp_get_long(const mp_int * a); /* get a platform dependent unsigned long long value */ -unsigned long long mp_get_long_long(mp_int * a); +Tcl_WideUInt mp_get_long_long(const mp_int * a); /* initialize and set a digit */ int mp_init_set (mp_int * a, mp_digit b); @@ -264,13 +264,13 @@ int mp_lshd(mp_int *a, int b); int mp_div_2d(const mp_int *a, int b, mp_int *c, mp_int *d); /* b = a/2 */ -int mp_div_2(mp_int *a, mp_int *b); +int mp_div_2(const mp_int *a, mp_int *b); /* c = a * 2**b, implemented as c = a << b */ int mp_mul_2d(const mp_int *a, int b, mp_int *c); /* b = a*2 */ -int mp_mul_2(mp_int *a, mp_int *b); +int mp_mul_2(const mp_int *a, mp_int *b); /* c = a mod 2**b */ int mp_mod_2d(const mp_int *a, int b, mp_int *c); |