diff options
author | Damien George <damien.p.george@gmail.com> | 2015-12-18 21:44:01 +0000 |
---|---|---|
committer | Damien George <damien.p.george@gmail.com> | 2015-12-18 21:44:01 +0000 |
commit | fe03e7bcb7a7dd95eb30bbe4e21ed9ef9bf88b25 (patch) | |
tree | 24273f421d3023bd45a42ce7d4ccb80f18af0792 | |
parent | a67651406d4154cd5093884dea6ca0ca395d56db (diff) | |
download | micropython-fe03e7bcb7a7dd95eb30bbe4e21ed9ef9bf88b25.tar.gz micropython-fe03e7bcb7a7dd95eb30bbe4e21ed9ef9bf88b25.zip |
py/obj: Fix float constants for MICROPY_OBJ_REPR_C.
-rw-r--r-- | py/obj.h | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -135,8 +135,8 @@ 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_int_t)(small_int)) << 1) | 1)) -#define mp_const_float_e MP_ROM_PTR(((0x402df854 & ~3) | 2) + 0x80800000) -#define mp_const_float_pi MP_ROM_PTR(((0x40490fdb & ~3) | 2) + 0x80800000) +#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)) static inline bool mp_obj_is_float(mp_const_obj_t o) { return (((mp_uint_t)(o)) & 3) == 2 && (((mp_uint_t)(o)) & 0xff800007) != 0x00000006; } |