summaryrefslogtreecommitdiffstats
path: root/libtommath
diff options
context:
space:
mode:
Diffstat (limited to 'libtommath')
-rw-r--r--libtommath/bn_mp_div_2.c2
-rw-r--r--libtommath/bn_mp_get_int.c2
-rw-r--r--libtommath/bn_mp_get_long.c2
-rw-r--r--libtommath/bn_mp_get_long_long.c6
-rw-r--r--libtommath/bn_mp_mul_2.c2
-rw-r--r--libtommath/bn_mp_set_long_long.c2
-rw-r--r--libtommath/tommath.h12
7 files changed, 14 insertions, 14 deletions
diff --git a/libtommath/bn_mp_div_2.c b/libtommath/bn_mp_div_2.c
index 2b5bb49..0e981a0 100644
--- a/libtommath/bn_mp_div_2.c
+++ b/libtommath/bn_mp_div_2.c
@@ -16,7 +16,7 @@
*/
/* b = a/2 */
-int mp_div_2(mp_int * a, mp_int * b)
+int mp_div_2(const mp_int * a, mp_int * b)
{
int x, res, oldused;
diff --git a/libtommath/bn_mp_get_int.c b/libtommath/bn_mp_get_int.c
index 5c820f8..abb7011 100644
--- a/libtommath/bn_mp_get_int.c
+++ b/libtommath/bn_mp_get_int.c
@@ -16,7 +16,7 @@
*/
/* get the lower 32-bits of an mp_int */
-unsigned long mp_get_int(mp_int * a)
+unsigned long mp_get_int(const mp_int * a)
{
int i;
mp_min_u32 res;
diff --git a/libtommath/bn_mp_get_long.c b/libtommath/bn_mp_get_long.c
index 7c3d0fe..da69080 100644
--- a/libtommath/bn_mp_get_long.c
+++ b/libtommath/bn_mp_get_long.c
@@ -16,7 +16,7 @@
*/
/* get the lower unsigned long of an mp_int, platform dependent */
-unsigned long mp_get_long(mp_int * a)
+unsigned long mp_get_long(const mp_int * a)
{
int i;
unsigned long res;
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);
diff --git a/libtommath/bn_mp_mul_2.c b/libtommath/bn_mp_mul_2.c
index d22fd89..0c8c2e3 100644
--- a/libtommath/bn_mp_mul_2.c
+++ b/libtommath/bn_mp_mul_2.c
@@ -16,7 +16,7 @@
*/
/* b = a*2 */
-int mp_mul_2(mp_int * a, mp_int * b)
+int mp_mul_2(const mp_int * a, mp_int * b)
{
int x, res, oldused;
diff --git a/libtommath/bn_mp_set_long_long.c b/libtommath/bn_mp_set_long_long.c
index 3566b45..0b8be33 100644
--- a/libtommath/bn_mp_set_long_long.c
+++ b/libtommath/bn_mp_set_long_long.c
@@ -16,7 +16,7 @@
*/
/* set a platform dependent unsigned long long int */
-MP_SET_XLONG(mp_set_long_long, unsigned long long)
+MP_SET_XLONG(mp_set_long_long, Tcl_WideUInt)
#endif
/* ref: $Format:%D$ */
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);