summaryrefslogtreecommitdiffstats
path: root/arith.h
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2017-06-18 08:34:08 -0700
committerKaz Kylheku <kaz@kylheku.com>2017-06-18 10:14:34 -0700
commitf9964fe5c922535d5284ad22d62fddbdca315e97 (patch)
tree48aa53103215b6434c90eeec1606f16f04503f94 /arith.h
parent1e35fa11db662e6237e76f800a9294809bcb1660 (diff)
downloadtxr-f9964fe5c922535d5284ad22d62fddbdca315e97.tar.gz
txr-f9964fe5c922535d5284ad22d62fddbdca315e97.tar.bz2
txr-f9964fe5c922535d5284ad22d62fddbdca315e97.zip
Handle returns of MPI functions that return MP_TOOBIG.
* arith.c (do_mp_error): New function. (num_from_buffer, plus, minus, mul, floordiv, expt, exptmod, logtrunc, sign_extend, ash, bit): Handle errors from select MPI functions: those that have the mp_ign attribute. * ffi.c (unum_carray, num_carray): Likewise. * rand.c (random): Likewise.
Diffstat (limited to 'arith.h')
-rw-r--r--arith.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/arith.h b/arith.h
index 32c19272..1fa4e6c4 100644
--- a/arith.h
+++ b/arith.h
@@ -45,5 +45,6 @@ val tofloatz(val obj);
val tointz(val obj, val base);
val width(val num);
val bits(val obj);
+noreturn void do_mp_error(val self, mp_err code);
void arith_init(void);
void arith_free_all(void);