summaryrefslogtreecommitdiffstatshomepage
path: root/py/bc.h
diff options
context:
space:
mode:
authorDamien George <damien.p.george@gmail.com>2015-11-27 12:54:30 +0000
committerDamien George <damien.p.george@gmail.com>2015-11-29 14:25:04 +0000
commit254cfa6c3189983050e66ccb4ec267b41299dd64 (patch)
treec74be8a4cb4b17817106fe375e4a62f883868095 /py/bc.h
parent9f6976b74e352d01bbfbb4b4d32465f9db5f3390 (diff)
downloadmicropython-254cfa6c3189983050e66ccb4ec267b41299dd64.tar.gz
micropython-254cfa6c3189983050e66ccb4ec267b41299dd64.zip
py: Use uintptr_t instead of mp_uint_t in MP_TAGPTR_* macros.
Diffstat (limited to 'py/bc.h')
-rw-r--r--py/bc.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/py/bc.h b/py/bc.h
index 14f5034f88..04575cee5a 100644
--- a/py/bc.h
+++ b/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)
// 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_TAG0(x) ((mp_uint_t)(x) & 1)
-#define MP_TAGPTR_TAG1(x) ((mp_uint_t)(x) & 2)
-#define MP_TAGPTR_MAKE(ptr, tag) ((void*)((mp_uint_t)(ptr) | (tag)))
+#define MP_TAGPTR_PTR(x) ((void*)((uintptr_t)(x) & ~((uintptr_t)3)))
+#define MP_TAGPTR_TAG0(x) ((uintptr_t)(x) & 1)
+#define MP_TAGPTR_TAG1(x) ((uintptr_t)(x) & 2)
+#define MP_TAGPTR_MAKE(ptr, tag) ((void*)((uintptr_t)(ptr) | (tag)))
#if MICROPY_PERSISTENT_CODE_LOAD || MICROPY_PERSISTENT_CODE_SAVE