summaryrefslogtreecommitdiffstatshomepage
path: root/py/emitglue.c
diff options
context:
space:
mode:
authorDamien George <damien.p.george@gmail.com>2016-01-31 22:24:16 +0000
committerDamien George <damien.p.george@gmail.com>2016-04-13 16:07:47 +0100
commit0a2e9650f5383bc1190d6b27a3d923e313c3d879 (patch)
treecf8cf4d9e9c69c1d07ef65cf926c47763df72ef3 /py/emitglue.c
parent0699c6bf9e7a1754002948063390b68590fc3e96 (diff)
downloadmicropython-0a2e9650f5383bc1190d6b27a3d923e313c3d879.tar.gz
micropython-0a2e9650f5383bc1190d6b27a3d923e313c3d879.zip
py: Add ability to have frozen persistent bytecode from .mpy files.
The config variable MICROPY_MODULE_FROZEN is now made of two separate parts: MICROPY_MODULE_FROZEN_STR and MICROPY_MODULE_FROZEN_MPY. This allows to have none, either or both of frozen strings and frozen mpy files (aka frozen bytecode).
Diffstat (limited to 'py/emitglue.c')
-rw-r--r--py/emitglue.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/py/emitglue.c b/py/emitglue.c
index 7e5edce756..c657d40d12 100644
--- a/py/emitglue.c
+++ b/py/emitglue.c
@@ -172,7 +172,7 @@ mp_obj_t mp_make_closure_from_raw_code(const mp_raw_code_t *rc, mp_uint_t n_clos
return mp_obj_new_closure(ffun, n_closed_over & 0xff, args + ((n_closed_over >> 7) & 2));
}
-#if MICROPY_PERSISTENT_CODE
+#if MICROPY_PERSISTENT_CODE_LOAD || MICROPY_PERSISTENT_CODE_SAVE
#include "py/smallint.h"
@@ -229,7 +229,7 @@ STATIC void extract_prelude(const byte **ip, const byte **ip2, bytecode_prelude_
}
}
-#endif // MICROPY_PERSISTENT_CODE
+#endif // MICROPY_PERSISTENT_CODE_LOAD || MICROPY_PERSISTENT_CODE_SAVE
#if MICROPY_PERSISTENT_CODE_LOAD