summaryrefslogtreecommitdiff
path: root/py/runtime.c
diff options
context:
space:
mode:
authorPaul Sokolovsky <pfalcon@users.sourceforge.net>2014-06-20 01:48:35 +0300
committerPaul Sokolovsky <pfalcon@users.sourceforge.net>2014-06-20 18:00:23 +0300
commit3b6f7b95eb487fc927a3bc4644b1941cfbe2612b (patch)
treee06661e63e4c8bd6f94494281237bc31f4d488eb /py/runtime.c
parent7efbd325bb5ac540b746a594a76185c211963c46 (diff)
py: Separate MICROPY_PY_BUILTINS_COMPLEX from MICROPY_PY_BUILTINS_FLOAT.
One thing is wanting to do 1 / 2 and get something else but 0, and quite another - doing rocket science ;-).
Diffstat (limited to 'py/runtime.c')
-rw-r--r--py/runtime.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/py/runtime.c b/py/runtime.c
index d57bb686d..b539984c0 100644
--- a/py/runtime.c
+++ b/py/runtime.c
@@ -426,6 +426,7 @@ mp_obj_t mp_binary_op(int op, mp_obj_t lhs, mp_obj_t rhs) {
} else {
return res;
}
+#if MICROPY_PY_BUILTINS_COMPLEX
} else if (MP_OBJ_IS_TYPE(rhs, &mp_type_complex)) {
mp_obj_t res = mp_obj_complex_binary_op(op, lhs_val, 0, rhs);
if (res == MP_OBJ_NULL) {
@@ -434,6 +435,7 @@ mp_obj_t mp_binary_op(int op, mp_obj_t lhs, mp_obj_t rhs) {
return res;
}
#endif
+#endif
}
}