commit | d1e355ea8e2a5a17ee126f5c3d173b2e6f33e460 | [log] [tgz] |
---|---|---|
author | Damien George <damien.p.george@gmail.com> | Wed May 28 14:51:12 2014 +0100 |
committer | Damien George <damien.p.george@gmail.com> | Wed May 28 14:51:12 2014 +0100 |
tree | d5ba59452f72a9dcc31fc6cdcf0ad8c08c8713b2 | |
parent | 813ed3bda6818bd8dd15ee5e3c673a24321e740b [diff] [blame] |
py: Fix check of small-int overflow when parsing ints. Also unifies use of SMALL_INT_FITS macro across parser and runtime.
diff --git a/py/runtime.c b/py/runtime.c index f487807..a9d5746 100644 --- a/py/runtime.c +++ b/py/runtime.c
@@ -413,7 +413,7 @@ goto unsupported_op; } // TODO: We just should make mp_obj_new_int() inline and use that - if (MP_OBJ_FITS_SMALL_INT(lhs_val)) { + if (MP_SMALL_INT_FITS(lhs_val)) { return MP_OBJ_NEW_SMALL_INT(lhs_val); } else { return mp_obj_new_int(lhs_val);