From 3b6f7b95eb487fc927a3bc4644b1941cfbe2612b Mon Sep 17 00:00:00 2001 From: Paul Sokolovsky Date: Fri, 20 Jun 2014 01:48:35 +0300 Subject: 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 ;-). --- py/runtime.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'py/runtime.c') 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) { @@ -433,6 +434,7 @@ mp_obj_t mp_binary_op(int op, mp_obj_t lhs, mp_obj_t rhs) { } else { return res; } +#endif #endif } } -- cgit v1.2.3