diff options
| author | Damien George <damien.p.george@gmail.com> | 2018-07-08 23:45:05 +1000 |
|---|---|---|
| committer | Damien George <damien.p.george@gmail.com> | 2018-07-08 23:45:05 +1000 |
| commit | 4a1edd83829d6d78ca5d172ad87e1f4a3802b483 (patch) | |
| tree | 0390fb556e62003040b31953f7fe5c75d99349a6 /py/obj.h | |
| parent | e1ae9939aca230758951f5b5b45084374e497254 (diff) | |
py/obj.h: Give compile error if using obj repr D with single-prec float.
Object representation D only works with no floats, or double precision
floats.
Diffstat (limited to 'py/obj.h')
| -rw-r--r-- | py/obj.h | 5 |
1 files changed, 5 insertions, 0 deletions
@@ -181,6 +181,11 @@ static inline bool MP_OBJ_IS_QSTR(mp_const_obj_t o) #define MP_OBJ_NEW_QSTR(qst) ((mp_obj_t)((((mp_uint_t)(qst)) << 1) | 0x0002000000000001)) #if MICROPY_PY_BUILTINS_FLOAT + +#if MICROPY_FLOAT_IMPL != MICROPY_FLOAT_IMPL_DOUBLE +#error MICROPY_OBJ_REPR_D requires MICROPY_FLOAT_IMPL_DOUBLE +#endif + #define mp_const_float_e {((mp_obj_t)((uint64_t)0x4005bf0a8b145769 + 0x8004000000000000))} #define mp_const_float_pi {((mp_obj_t)((uint64_t)0x400921fb54442d18 + 0x8004000000000000))} |
