diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2017-06-18 08:34:08 -0700 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2017-06-18 10:14:34 -0700 |
commit | f9964fe5c922535d5284ad22d62fddbdca315e97 (patch) | |
tree | 48aa53103215b6434c90eeec1606f16f04503f94 /arith.h | |
parent | 1e35fa11db662e6237e76f800a9294809bcb1660 (diff) | |
download | txr-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.h | 1 |
1 files changed, 1 insertions, 0 deletions
@@ -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); |