From 1fa6be52646f015b28abc0f1535af7bc4ffb647d Mon Sep 17 00:00:00 2001 From: Damien George <damien.p.george@gmail.com> Date: Fri, 8 Jan 2016 13:43:13 +0000 Subject: [PATCH] py/obj: For OBJ_REPR_D, use uint32_t cast when extracting qstr value. --- py/obj.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/py/obj.h b/py/obj.h index 509d6a67b..07189d479 100644 --- a/py/obj.h +++ b/py/obj.h @@ -172,7 +172,7 @@ static inline bool MP_OBJ_IS_SMALL_INT(mp_const_obj_t o) static inline bool MP_OBJ_IS_QSTR(mp_const_obj_t o) { return ((((mp_int_t)(o)) & 0xffff000000000000) == 0x0002000000000000); } -#define MP_OBJ_QSTR_VALUE(o) ((((mp_uint_t)(o)) >> 1) & 0xffffffff) +#define MP_OBJ_QSTR_VALUE(o) ((((uint32_t)(o)) >> 1) & 0xffffffff) #define MP_OBJ_NEW_QSTR(qst) ((mp_obj_t)((((mp_uint_t)(qst)) << 1) | 0x0002000000000001)) #if MICROPY_PY_BUILTINS_FLOAT -- GitLab