aboutsummaryrefslogtreecommitdiff
path: root/py/objint.c
diff options
context:
space:
mode:
authorDamien George <damien.p.george@gmail.com>2019-11-05 11:33:03 +1100
committerDamien George <damien.p.george@gmail.com>2019-11-05 11:35:45 +1100
commitc13f9f209d7a343fe306a24a04eb934ce905b631 (patch)
tree1f663134d7784aa0a2b43fe349e49ad82f5817f8 /py/objint.c
parent80df377e9512ac839ab19192ff1897ba30be098b (diff)
all: Convert nlr_raise(mp_obj_new_exception_msg(x)) to mp_raise_msg(x).
This helper function was added a while ago and these are the remaining cases to convert, to save a bit of code size.
Diffstat (limited to 'py/objint.c')
-rw-r--r--py/objint.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/py/objint.c b/py/objint.c
index 6473767e4..2fdcf5864 100644
--- a/py/objint.c
+++ b/py/objint.c
@@ -137,7 +137,7 @@ STATIC mp_fp_as_int_class_t mp_classify_fp_as_int(mp_float_t val) {
mp_obj_t mp_obj_new_int_from_float(mp_float_t val) {
int cl = fpclassify(val);
if (cl == FP_INFINITE) {
- nlr_raise(mp_obj_new_exception_msg(&mp_type_OverflowError, "can't convert inf to int"));
+ mp_raise_msg(&mp_type_OverflowError, "can't convert inf to int");
} else if (cl == FP_NAN) {
mp_raise_ValueError("can't convert NaN to int");
} else {