diff options
author | Damien George <damien@micropython.org> | 2024-07-17 16:06:12 +1000 |
---|---|---|
committer | Damien George <damien@micropython.org> | 2025-02-11 16:54:02 +1100 |
commit | a11ba7775e600b45c0e93443ca05dffb09a49389 (patch) | |
tree | 9bb1dcb27c31edecc28ce6804ad5e3d8b9257b84 /py/persistentcode.h | |
parent | ceb8ba60b4fea0c32e4977d0e45d5c0203b27b34 (diff) | |
download | micropython-a11ba7775e600b45c0e93443ca05dffb09a49389.tar.gz micropython-a11ba7775e600b45c0e93443ca05dffb09a49389.zip |
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>
Diffstat (limited to 'py/persistentcode.h')
-rw-r--r-- | py/persistentcode.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/py/persistentcode.h b/py/persistentcode.h index f0b7f70f7d..cf257a7ab1 100644 --- a/py/persistentcode.h +++ b/py/persistentcode.h @@ -121,6 +121,7 @@ void mp_raw_code_load_file(qstr filename, mp_compiled_module_t *ctx); void mp_raw_code_save(mp_compiled_module_t *cm, mp_print_t *print); void mp_raw_code_save_file(mp_compiled_module_t *cm, qstr filename); +mp_obj_t mp_raw_code_save_fun_to_bytes(const mp_module_constants_t *consts, const uint8_t *bytecode); void mp_native_relocate(void *reloc, uint8_t *text, uintptr_t reloc_text); |