py: Use uintptr_t instead of mp_uint_t in MP_TAGPTR_* macros.
This commit is contained in:
parent
9f6976b74e
commit
254cfa6c31
8
py/bc.h
8
py/bc.h
|
@ -99,10 +99,10 @@ const byte *mp_bytecode_print_str(const byte *ip);
|
||||||
#define mp_bytecode_print_inst(code) mp_bytecode_print2(code, 1)
|
#define mp_bytecode_print_inst(code) mp_bytecode_print2(code, 1)
|
||||||
|
|
||||||
// Helper macros to access pointer with least significant bits holding flags
|
// Helper macros to access pointer with least significant bits holding flags
|
||||||
#define MP_TAGPTR_PTR(x) ((void*)((mp_uint_t)(x) & ~((mp_uint_t)3)))
|
#define MP_TAGPTR_PTR(x) ((void*)((uintptr_t)(x) & ~((uintptr_t)3)))
|
||||||
#define MP_TAGPTR_TAG0(x) ((mp_uint_t)(x) & 1)
|
#define MP_TAGPTR_TAG0(x) ((uintptr_t)(x) & 1)
|
||||||
#define MP_TAGPTR_TAG1(x) ((mp_uint_t)(x) & 2)
|
#define MP_TAGPTR_TAG1(x) ((uintptr_t)(x) & 2)
|
||||||
#define MP_TAGPTR_MAKE(ptr, tag) ((void*)((mp_uint_t)(ptr) | (tag)))
|
#define MP_TAGPTR_MAKE(ptr, tag) ((void*)((uintptr_t)(ptr) | (tag)))
|
||||||
|
|
||||||
#if MICROPY_PERSISTENT_CODE_LOAD || MICROPY_PERSISTENT_CODE_SAVE
|
#if MICROPY_PERSISTENT_CODE_LOAD || MICROPY_PERSISTENT_CODE_SAVE
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue