diff options
Diffstat (limited to 'py/runtime.c')
-rw-r--r-- | py/runtime.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/py/runtime.c b/py/runtime.c index a9d57460ac..ecaf40deb4 100644 --- a/py/runtime.c +++ b/py/runtime.c @@ -353,7 +353,7 @@ mp_obj_t mp_binary_op(int op, mp_obj_t lhs, mp_obj_t rhs) { lhs_val = mp_small_int_floor_divide(lhs_val, rhs_val); break; - #if MICROPY_ENABLE_FLOAT + #if MICROPY_PY_BUILTINS_FLOAT case MP_BINARY_OP_TRUE_DIVIDE: case MP_BINARY_OP_INPLACE_TRUE_DIVIDE: if (rhs_val == 0) { @@ -371,7 +371,7 @@ mp_obj_t mp_binary_op(int op, mp_obj_t lhs, mp_obj_t rhs) { case MP_BINARY_OP_POWER: case MP_BINARY_OP_INPLACE_POWER: if (rhs_val < 0) { - #if MICROPY_ENABLE_FLOAT + #if MICROPY_PY_BUILTINS_FLOAT lhs = mp_obj_new_float(lhs_val); goto generic_binary_op; #else @@ -418,7 +418,7 @@ mp_obj_t mp_binary_op(int op, mp_obj_t lhs, mp_obj_t rhs) { } else { return mp_obj_new_int(lhs_val); } -#if MICROPY_ENABLE_FLOAT +#if MICROPY_PY_BUILTINS_FLOAT } else if (MP_OBJ_IS_TYPE(rhs, &mp_type_float)) { mp_obj_t res = mp_obj_float_binary_op(op, lhs_val, rhs); if (res == MP_OBJ_NULL) { @@ -1173,8 +1173,10 @@ void *const mp_fun_table[MP_F_NUMBER_OF] = { mp_obj_list_append, mp_obj_new_dict, mp_obj_dict_store, +#if MICROPY_PY_BUILTINS_SET mp_obj_new_set, mp_obj_set_store, +#endif mp_make_function_from_raw_code, mp_call_function_n_kw_for_native, mp_call_method_n_kw, @@ -1183,7 +1185,9 @@ void *const mp_fun_table[MP_F_NUMBER_OF] = { mp_import_name, mp_import_from, mp_import_all, +#if MICROPY_PY_BUILTINS_SLICE mp_obj_new_slice, +#endif mp_unpack_sequence, mp_unpack_ex, }; |