diff options
author | Damien George <damien.p.george@gmail.com> | 2014-01-31 00:42:12 +0000 |
---|---|---|
committer | Damien George <damien.p.george@gmail.com> | 2014-01-31 00:42:12 +0000 |
commit | 3f759b71c63f5e01df18a6e204c50f78d1b6a20b (patch) | |
tree | d61545b70070d262f07d52f3ee61ccf2cabc12a7 | |
parent | 28f93fbb4884944a9ca74af86579eea84e9b0e8f (diff) | |
download | micropython-3f759b71c63f5e01df18a6e204c50f78d1b6a20b.tar.gz micropython-3f759b71c63f5e01df18a6e204c50f78d1b6a20b.zip |
py: Add MICROPY_ENABLE_FLOAT around a float specific piece of code.
-rw-r--r-- | py/runtime.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/py/runtime.c b/py/runtime.c index b1027de932..ea96ca9f7a 100644 --- a/py/runtime.c +++ b/py/runtime.c @@ -616,10 +616,12 @@ mp_obj_t rt_binary_op(int op, mp_obj_t lhs, mp_obj_t rhs) { return MP_OBJ_NEW_SMALL_INT(lhs_val); } return mp_obj_new_int(lhs_val); +#if MICROPY_ENABLE_FLOAT } else if (MP_OBJ_IS_TYPE(rhs, &float_type)) { return mp_obj_float_binary_op(op, lhs_val, rhs); } else if (MP_OBJ_IS_TYPE(rhs, &complex_type)) { return mp_obj_complex_binary_op(op, lhs_val, 0, rhs); +#endif } } |