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 | 72cd4c6a0763c30b3f3a4fceb1ed78ad63711cb5 (patch) | |
tree | cdcbe1f7914fe91fdc459bb357195d82514df01c /libtommath/bn_mp_get_long_long.c | |
parent | 86eedd9ac8aa6c202c941fe08d1ec6fd255f422f (diff) | |
download | tcl-72cd4c6a0763c30b3f3a4fceb1ed78ad63711cb5.zip tcl-72cd4c6a0763c30b3f3a4fceb1ed78ad63711cb5.tar.gz tcl-72cd4c6a0763c30b3f3a4fceb1ed78ad63711cb5.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/bn_mp_get_long_long.c')
-rw-r--r-- | libtommath/bn_mp_get_long_long.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/libtommath/bn_mp_get_long_long.c b/libtommath/bn_mp_get_long_long.c index 4b959e6..534c48c 100644 --- a/libtommath/bn_mp_get_long_long.c +++ b/libtommath/bn_mp_get_long_long.c @@ -16,17 +16,17 @@ */ /* get the lower unsigned long long of an mp_int, platform dependent */ -unsigned long long mp_get_long_long (mp_int * a) +Tcl_WideUInt mp_get_long_long (const mp_int * a) { int i; - unsigned long long res; + Tcl_WideUInt res; if (a->used == 0) { return 0; } /* get number of digits of the lsb we have to read */ - i = MIN(a->used,(int)(((sizeof(unsigned long long) * CHAR_BIT) + DIGIT_BIT - 1) / DIGIT_BIT)) - 1; + i = MIN(a->used,(int)(((sizeof(Tcl_WideUInt) * CHAR_BIT) + DIGIT_BIT - 1) / DIGIT_BIT)) - 1; /* get most significant digit of result */ res = DIGIT(a,i); |