diff options
author | Damien George <damien.p.george@gmail.com> | 2018-02-14 18:41:17 +1100 |
---|---|---|
committer | Damien George <damien.p.george@gmail.com> | 2018-02-14 18:41:17 +1100 |
commit | 5604b710c2490e2a7cfd1bac6cd60fc2c8527a37 (patch) | |
tree | d5c5aaa6ccc48dbf9bce22c6a66d369fd9b61c2c /py/emitglue.h | |
parent | e98ff40604170eb231225a4285d9ef740b8b9501 (diff) |
py/emitglue: When assigning bytecode only pass bytecode len if needed.
Most embedded targets will have this bit of the code disabled, saving a
small amount of code space.
Diffstat (limited to 'py/emitglue.h')
-rw-r--r-- | py/emitglue.h | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/py/emitglue.h b/py/emitglue.h index f2a48c5e5..0830a0d5c 100644 --- a/py/emitglue.h +++ b/py/emitglue.h @@ -63,7 +63,10 @@ typedef struct _mp_raw_code_t { mp_raw_code_t *mp_emit_glue_new_raw_code(void); -void mp_emit_glue_assign_bytecode(mp_raw_code_t *rc, const byte *code, mp_uint_t len, +void mp_emit_glue_assign_bytecode(mp_raw_code_t *rc, const byte *code, + #if MICROPY_PERSISTENT_CODE_SAVE || MICROPY_DEBUG_PRINTERS + size_t len, + #endif const mp_uint_t *const_table, #if MICROPY_PERSISTENT_CODE_SAVE uint16_t n_obj, uint16_t n_raw_code, |