summaryrefslogtreecommitdiffstats
path: root/generic/tclTomMath.h
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2017-09-11 10:38:07 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2017-09-11 10:38:07 (GMT)
commitb9e8eecd80020e9dc1539f6f99f121472aff3126 (patch)
tree2e262a4602582231d8ffc8cfae0ed63eae88e24f /generic/tclTomMath.h
parent72cd4c6a0763c30b3f3a4fceb1ed78ad63711cb5 (diff)
downloadtcl-b9e8eecd80020e9dc1539f6f99f121472aff3126.zip
tcl-b9e8eecd80020e9dc1539f6f99f121472aff3126.tar.gz
tcl-b9e8eecd80020e9dc1539f6f99f121472aff3126.tar.bz2
Many 'const' addtions in libtommath where it makes sense. To be submitted back to the libtommath guys.
Diffstat (limited to 'generic/tclTomMath.h')
-rw-r--r--generic/tclTomMath.h38
1 files changed, 19 insertions, 19 deletions
diff --git a/generic/tclTomMath.h b/generic/tclTomMath.h
index 7e3c29e..2ce8194 100644
--- a/generic/tclTomMath.h
+++ b/generic/tclTomMath.h
@@ -27,7 +27,7 @@ extern "C" {
#endif
/* detect 64-bit mode if possible */
-#if defined(NEVER) /* 128-bit ints fail in too many places */
+#if defined(NEVER)
#if !(defined(MP_32BIT) || defined(MP_16BIT) || defined(MP_8BIT))
#define MP_64BIT
#endif
@@ -383,17 +383,17 @@ int mp_rand(mp_int *a, int digits);
/* ---> binary operations <--- */
/* c = a XOR b */
/*
-int mp_xor(mp_int *a, mp_int *b, mp_int *c);
+int mp_xor(const mp_int *a, const mp_int *b, mp_int *c);
*/
/* c = a OR b */
/*
-int mp_or(mp_int *a, mp_int *b, mp_int *c);
+int mp_or(const mp_int *a, const mp_int *b, mp_int *c);
*/
/* c = a AND b */
/*
-int mp_and(mp_int *a, mp_int *b, mp_int *c);
+int mp_and(const mp_int *a, const mp_int *b, mp_int *c);
*/
/* ---> Basic arithmetic <--- */
@@ -405,7 +405,7 @@ int mp_neg(const mp_int *a, mp_int *b);
/* b = |a| */
/*
-int mp_abs(mp_int *a, mp_int *b);
+int mp_abs(const mp_int *a, mp_int *b);
*/
/* compare a to b */
@@ -420,32 +420,32 @@ int mp_cmp_mag(const mp_int *a, const mp_int *b);
/* c = a + b */
/*
-int mp_add(mp_int *a, mp_int *b, mp_int *c);
+int mp_add(const mp_int *a, const mp_int *b, mp_int *c);
*/
/* c = a - b */
/*
-int mp_sub(mp_int *a, mp_int *b, mp_int *c);
+int mp_sub(const mp_int *a, const mp_int *b, mp_int *c);
*/
/* c = a * b */
/*
-int mp_mul(mp_int *a, mp_int *b, mp_int *c);
+int mp_mul(const mp_int *a, const mp_int *b, mp_int *c);
*/
/* b = a*a */
/*
-int mp_sqr(mp_int *a, mp_int *b);
+int mp_sqr(const mp_int *a, mp_int *b);
*/
/* a/b => cb + d == a */
/*
-int mp_div(mp_int *a, mp_int *b, mp_int *c, mp_int *d);
+int mp_div(const mp_int *a, const mp_int *b, mp_int *c, mp_int *d);
*/
/* c = a mod b, 0 <= c < b */
/*
-int mp_mod(mp_int *a, mp_int *b, mp_int *c);
+int mp_mod(const mp_int *a, const mp_int *b, mp_int *c);
*/
/* ---> single digit functions <--- */
@@ -457,40 +457,40 @@ int mp_cmp_d(const mp_int *a, mp_digit b);
/* c = a + b */
/*
-int mp_add_d(mp_int *a, mp_digit b, mp_int *c);
+int mp_add_d(const mp_int *a, const mp_digit b, mp_int *c);
*/
/* c = a - b */
/*
-int mp_sub_d(mp_int *a, mp_digit b, mp_int *c);
+int mp_sub_d(const mp_int *a, mp_digit b, mp_int *c);
*/
/* c = a * b */
/*
-int mp_mul_d(mp_int *a, mp_digit b, mp_int *c);
+int mp_mul_d(const mp_int *a, mp_digit b, mp_int *c);
*/
/* a/b => cb + d == a */
/*
-int mp_div_d(mp_int *a, mp_digit b, mp_int *c, mp_digit *d);
+int mp_div_d(const mp_int *a, mp_digit b, mp_int *c, mp_digit *d);
*/
/* a/3 => 3c + d == a */
/*
-int mp_div_3(mp_int *a, mp_int *c, mp_digit *d);
+int mp_div_3(const mp_int *a, mp_int *c, mp_digit *d);
*/
/* c = a**b */
/*
-int mp_expt_d(mp_int *a, mp_digit b, mp_int *c);
+int mp_expt_d(const mp_int *a, const mp_digit b, mp_int *c);
*/
/*
-int mp_expt_d_ex (mp_int * a, mp_digit b, mp_int * c, int fast);
+int mp_expt_d_ex (const mp_int * a, const mp_digit b, mp_int * c, int fast);
*/
/* c = a mod b, 0 <= c < b */
/*
-int mp_mod_d(mp_int *a, mp_digit b, mp_digit *c);
+int mp_mod_d(const mp_int *a, mp_digit b, mp_digit *c);
*/
/* ---> number theory <--- */