summaryrefslogtreecommitdiff
path: root/py/smallint.h
diff options
context:
space:
mode:
Diffstat (limited to 'py/smallint.h')
-rw-r--r--py/smallint.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/py/smallint.h b/py/smallint.h
index 584e0018d..e50f98651 100644
--- a/py/smallint.h
+++ b/py/smallint.h
@@ -68,7 +68,10 @@
// The number of bits in a MP_SMALL_INT including the sign bit.
#define MP_SMALL_INT_BITS (MP_IMAX_BITS(MP_SMALL_INT_MAX) + 1)
-bool mp_small_int_mul_overflow(mp_int_t x, mp_int_t y);
+// Multiply two small ints.
+// If returns false, the correct result is stored in 'res'
+// If returns true, the multiplication would have overflowed. 'res' is unchanged.
+bool mp_small_int_mul_overflow(mp_int_t x, mp_int_t y, mp_int_t *res);
mp_int_t mp_small_int_modulo(mp_int_t dividend, mp_int_t divisor);
mp_int_t mp_small_int_floor_divide(mp_int_t num, mp_int_t denom);