kopia lustrzana https://github.com/micropython/micropython
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>pull/14019/head
rodzic
bc424ddc41
commit
7d5f697c38
|
@ -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));
|
||||
}
|
||||
|
||||
|
|
Ładowanie…
Reference in New Issue