summaryrefslogtreecommitdiffstatshomepage
path: root/py/runtime.c
diff options
context:
space:
mode:
authorDamien George <damien.p.george@gmail.com>2015-08-20 23:30:12 +0100
committerDamien George <damien.p.george@gmail.com>2015-10-20 12:35:17 +0100
commitaaef1851a748af95f8b105ef2d1d4f35e6ede02b (patch)
treedec9fac8e9ed288aa0b4a2abfed093208c2dd12e /py/runtime.c
parent60401d461ab41d94eeb174ae0f4db9a57d43880a (diff)
downloadmicropython-aaef1851a748af95f8b105ef2d1d4f35e6ede02b.tar.gz
micropython-aaef1851a748af95f8b105ef2d1d4f35e6ede02b.zip
py: Add mp_obj_is_float function (macro) and use it where appropriate.
Diffstat (limited to 'py/runtime.c')
-rw-r--r--py/runtime.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/py/runtime.c b/py/runtime.c
index 4e055776b0..dd2c17797d 100644
--- a/py/runtime.c
+++ b/py/runtime.c
@@ -458,7 +458,7 @@ mp_obj_t mp_binary_op(mp_uint_t op, mp_obj_t lhs, mp_obj_t rhs) {
return mp_obj_new_int(lhs_val);
}
#if MICROPY_PY_BUILTINS_FLOAT
- } else if (MP_OBJ_IS_TYPE(rhs, &mp_type_float)) {
+ } else if (mp_obj_is_float(rhs)) {
mp_obj_t res = mp_obj_float_binary_op(op, lhs_val, rhs);
if (res == MP_OBJ_NULL) {
goto unsupported_op;