py/emitglue: Make mp_emit_glue_assign_native's fun_data arg a const ptr.

It will only ever be read from, and in some cases (eg on esp8266) can
actually be in ROM.

Signed-off-by: Damien George <damien@micropython.org>
This commit is contained in:
Damien George
2024-02-22 10:49:03 +11:00
parent 01f4e85f1b
commit 9e5b6972c7
2 changed files with 4 additions and 4 deletions

View File

@@ -130,7 +130,7 @@ void mp_emit_glue_assign_bytecode(mp_raw_code_t *rc, const byte *code,
#endif
uint16_t scope_flags);
void mp_emit_glue_assign_native(mp_raw_code_t *rc, mp_raw_code_kind_t kind, void *fun_data, mp_uint_t fun_len,
void mp_emit_glue_assign_native(mp_raw_code_t *rc, mp_raw_code_kind_t kind, const void *fun_data, mp_uint_t fun_len,
mp_raw_code_t **children,
#if MICROPY_PERSISTENT_CODE_SAVE
uint16_t n_children,