Skip to content

Commit 1fa6be5

Browse files
committed
py/obj: For OBJ_REPR_D, use uint32_t cast when extracting qstr value.
1 parent 7dbf74c commit 1fa6be5

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

py/obj.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,7 @@ static inline bool MP_OBJ_IS_SMALL_INT(mp_const_obj_t o)
172172

173173
static inline bool MP_OBJ_IS_QSTR(mp_const_obj_t o)
174174
{ return ((((mp_int_t)(o)) & 0xffff000000000000) == 0x0002000000000000); }
175-
#define MP_OBJ_QSTR_VALUE(o) ((((mp_uint_t)(o)) >> 1) & 0xffffffff)
175+
#define MP_OBJ_QSTR_VALUE(o) ((((uint32_t)(o)) >> 1) & 0xffffffff)
176176
#define MP_OBJ_NEW_QSTR(qst) ((mp_obj_t)((((mp_uint_t)(qst)) << 1) | 0x0002000000000001))
177177

178178
#if MICROPY_PY_BUILTINS_FLOAT

0 commit comments

Comments
 (0)