summaryrefslogtreecommitdiffstatshomepage
path: root/py/mpconfig.h
diff options
context:
space:
mode:
authorDamien George <damien@micropython.org>2024-07-17 16:06:12 +1000
committerDamien George <damien@micropython.org>2025-02-11 16:54:02 +1100
commita11ba7775e600b45c0e93443ca05dffb09a49389 (patch)
tree9bb1dcb27c31edecc28ce6804ad5e3d8b9257b84 /py/mpconfig.h
parentceb8ba60b4fea0c32e4977d0e45d5c0203b27b34 (diff)
downloadmicropython-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/mpconfig.h')
-rw-r--r--py/mpconfig.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/py/mpconfig.h b/py/mpconfig.h
index 5c4d19bb56..a25d8cd32a 100644
--- a/py/mpconfig.h
+++ b/py/mpconfig.h
@@ -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