Skip to content

Commit dc3eb55

Browse files
committed
py/obj.h: If not float support is enabled, define mp_obj_is_float(o) to false.
We have so many configuration options, that finally having shortcuts like this is helpful and cuts on number of ifdef's.
1 parent e5cff5b commit dc3eb55

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

py/obj.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -710,6 +710,8 @@ mp_obj_t mp_obj_float_binary_op(mp_uint_t op, mp_float_t lhs_val, mp_obj_t rhs);
710710
// complex
711711
void mp_obj_complex_get(mp_obj_t self_in, mp_float_t *real, mp_float_t *imag);
712712
mp_obj_t mp_obj_complex_binary_op(mp_uint_t op, mp_float_t lhs_real, mp_float_t lhs_imag, mp_obj_t rhs_in); // can return MP_OBJ_NULL if op not supported
713+
#else
714+
#define mp_obj_is_float(o) (false)
713715
#endif
714716

715717
// tuple

0 commit comments

Comments
 (0)