Skip to content

Commit 3f759b7

Browse files
committed
py: Add MICROPY_ENABLE_FLOAT around a float specific piece of code.
1 parent 28f93fb commit 3f759b7

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

py/runtime.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -616,10 +616,12 @@ mp_obj_t rt_binary_op(int op, mp_obj_t lhs, mp_obj_t rhs) {
616616
return MP_OBJ_NEW_SMALL_INT(lhs_val);
617617
}
618618
return mp_obj_new_int(lhs_val);
619+
#if MICROPY_ENABLE_FLOAT
619620
} else if (MP_OBJ_IS_TYPE(rhs, &float_type)) {
620621
return mp_obj_float_binary_op(op, lhs_val, rhs);
621622
} else if (MP_OBJ_IS_TYPE(rhs, &complex_type)) {
622623
return mp_obj_complex_binary_op(op, lhs_val, 0, rhs);
624+
#endif
623625
}
624626
}
625627

0 commit comments

Comments
 (0)