summaryrefslogtreecommitdiffstatshomepage
path: root/py/runtime.c
diff options
context:
space:
mode:
authorDamien George <damien@micropython.org>2025-04-22 11:48:30 +1000
committerDamien George <damien@micropython.org>2025-05-21 12:53:14 +1000
commit3d7edbd9ab80182b0a11a5df3860dd12f65597a4 (patch)
tree86e74ee253d03df148132455593468f930459185 /py/runtime.c
parent3d19a8bc2df1d153aedde587e8f8e9fded4d6c08 (diff)
downloadmicropython-3d7edbd9ab80182b0a11a5df3860dd12f65597a4.tar.gz
micropython-3d7edbd9ab80182b0a11a5df3860dd12f65597a4.zip
py/persistentcode: Allow a port a custom commit function and track data.
Allows both MICROPY_PERSISTENT_CODE_TRACK_FUN_DATA and MP_PLAT_COMMIT_EXEC to be enabled at the same time. Signed-off-by: Damien George <damien@micropython.org>
Diffstat (limited to 'py/runtime.c')
-rw-r--r--py/runtime.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/py/runtime.c b/py/runtime.c
index d6fea172f2..7979e520da 100644
--- a/py/runtime.c
+++ b/py/runtime.c
@@ -123,7 +123,7 @@ void mp_init(void) {
MP_STATE_VM(mp_module_builtins_override_dict) = NULL;
#endif
- #if MICROPY_PERSISTENT_CODE_TRACK_FUN_DATA || MICROPY_PERSISTENT_CODE_TRACK_BSS_RODATA
+ #if MICROPY_EMIT_MACHINE_CODE && (MICROPY_PERSISTENT_CODE_TRACK_FUN_DATA || MICROPY_PERSISTENT_CODE_TRACK_BSS_RODATA)
MP_STATE_VM(persistent_code_root_pointers) = MP_OBJ_NULL;
#endif