summaryrefslogtreecommitdiff
path: root/py/persistentcode.c
diff options
context:
space:
mode:
authorDamien George <damien@micropython.org>2024-02-13 10:46:11 +1100
committerDamien George <damien@micropython.org>2024-02-16 14:17:01 +1100
commitdef6ad474264a677d22f62c741ef422321a4a41a (patch)
tree6fe582befffdb59316e9c2121f53553bf6af5be3 /py/persistentcode.c
parent5a3dd8c79185be07b7bf68d51ccc8f98ced59182 (diff)
py/emitglue: Include fun_data_len in mp_raw_code_t only when saving.
Reduces the size of mp_raw_code_t in the case when MICROPY_DEBUG_PRINTERS is enabled. Signed-off-by: Damien George <damien@micropython.org>
Diffstat (limited to 'py/persistentcode.c')
-rw-r--r--py/persistentcode.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/py/persistentcode.c b/py/persistentcode.c
index 7b002e7fc..1fe9a9a23 100644
--- a/py/persistentcode.c
+++ b/py/persistentcode.c
@@ -324,11 +324,9 @@ STATIC mp_raw_code_t *load_raw_code(mp_reader_t *reader, mp_module_context_t *co
MP_BC_PRELUDE_SIG_DECODE(ip);
// Assign bytecode to raw code object
mp_emit_glue_assign_bytecode(rc, fun_data,
- #if MICROPY_PERSISTENT_CODE_SAVE || MICROPY_DEBUG_PRINTERS
- fun_data_len,
- #endif
children,
#if MICROPY_PERSISTENT_CODE_SAVE
+ fun_data_len,
n_children,
#endif
scope_flags);