mirror of
https://github.com/micropython/micropython.git
synced 2026-01-05 03:30:14 +01:00
py/persistentcode: Add mp_raw_code_save_fun_to_bytes.
Serialises a bytecode function/generator to a valid .mpy as bytes. Signed-off-by: Damien George <damien@micropython.org>
This commit is contained in:
@@ -342,6 +342,11 @@
|
||||
#define MICROPY_PERSISTENT_CODE_SAVE_FILE (0)
|
||||
#endif
|
||||
|
||||
// Whether to support converting functions to persistent code (bytes)
|
||||
#ifndef MICROPY_PERSISTENT_CODE_SAVE_FUN
|
||||
#define MICROPY_PERSISTENT_CODE_SAVE_FUN (MICROPY_CONFIG_ROM_LEVEL_AT_LEAST_EVERYTHING)
|
||||
#endif
|
||||
|
||||
// Whether generated code can persist independently of the VM/runtime instance
|
||||
// This is enabled automatically when needed by other features
|
||||
#ifndef MICROPY_PERSISTENT_CODE
|
||||
|
||||
Reference in New Issue
Block a user