summaryrefslogtreecommitdiffstatshomepage
path: root/py
diff options
context:
space:
mode:
authorDamien George <damien@micropython.org>2024-03-04 10:27:07 +1100
committerDamien George <damien@micropython.org>2024-03-04 10:27:07 +1100
commit7d5f697c38629ceee5aa169f5b776de40c37a244 (patch)
treec29f1d1aedb1a3033a58e5b998b8ed5fdd55a9a0 /py
parentbc424ddc4165ffd8203b4e781f7c686598601e15 (diff)
downloadmicropython-7d5f697c38629ceee5aa169f5b776de40c37a244.tar.gz
micropython-7d5f697c38629ceee5aa169f5b776de40c37a244.zip
py/emitglue: Add explicit cast of proto_fun to uint8_t pointer.
Otherwise C++ compilers may complain when this header is included in an extern "C" block. Signed-off-by: Damien George <damien@micropython.org>
Diffstat (limited to 'py')
-rw-r--r--py/emitglue.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/py/emitglue.h b/py/emitglue.h
index 0960ee22da..126462671b 100644
--- a/py/emitglue.h
+++ b/py/emitglue.h
@@ -63,7 +63,7 @@ typedef const void *mp_proto_fun_t;
// is guaranteed to have either its first or second byte non-zero. So if both bytes are
// zero then the mp_proto_fun_t pointer must be an mp_raw_code_t.
static inline bool mp_proto_fun_is_bytecode(mp_proto_fun_t proto_fun) {
- const uint8_t *header = proto_fun;
+ const uint8_t *header = (const uint8_t *)proto_fun;
return (header[0] | (header[1] << 8)) != (MP_PROTO_FUN_INDICATOR_RAW_CODE_0 | (MP_PROTO_FUN_INDICATOR_RAW_CODE_1 << 8));
}