diff options
author | Nicko van Someren <nicko@nicko.org> | 2018-07-02 14:52:53 -0600 |
---|---|---|
committer | Damien George <damien.p.george@gmail.com> | 2018-07-03 09:51:08 +1000 |
commit | d66c33cbd6bd144565c6cf24cebf711ee03704c2 (patch) | |
tree | ace9c7df243bb39312866448cb2f612878422bf4 /py/obj.h | |
parent | b488a4a8480533a6a3c9468c2f8bd359c94d4d02 (diff) |
py/obj.h: Fix broken build for object repr C when float disabled.
Fixes issue #3914.
Diffstat (limited to 'py/obj.h')
-rw-r--r-- | py/obj.h | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -138,6 +138,7 @@ static inline bool MP_OBJ_IS_SMALL_INT(mp_const_obj_t o) #define MP_OBJ_SMALL_INT_VALUE(o) (((mp_int_t)(o)) >> 1) #define MP_OBJ_NEW_SMALL_INT(small_int) ((mp_obj_t)((((mp_uint_t)(small_int)) << 1) | 1)) +#if MICROPY_PY_BUILTINS_FLOAT #define mp_const_float_e MP_ROM_PTR((mp_obj_t)(((0x402df854 & ~3) | 2) + 0x80800000)) #define mp_const_float_pi MP_ROM_PTR((mp_obj_t)(((0x40490fdb & ~3) | 2) + 0x80800000)) @@ -157,6 +158,7 @@ static inline mp_obj_t mp_obj_new_float(mp_float_t f) { } num = {.f = f}; return (mp_obj_t)(((num.u & ~0x3) | 2) + 0x80800000); } +#endif static inline bool MP_OBJ_IS_QSTR(mp_const_obj_t o) { return (((mp_uint_t)(o)) & 0xff800007) == 0x00000006; } |