From 0a2e9650f5383bc1190d6b27a3d923e313c3d879 Mon Sep 17 00:00:00 2001 From: Damien George Date: Sun, 31 Jan 2016 22:24:16 +0000 Subject: 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). --- py/frozenmod.h | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'py/frozenmod.h') diff --git a/py/frozenmod.h b/py/frozenmod.h index 67caced14..a1638d229 100644 --- a/py/frozenmod.h +++ b/py/frozenmod.h @@ -24,4 +24,10 @@ * THE SOFTWARE. */ -mp_lexer_t *mp_find_frozen_module(const char *str, int len); +enum { + MP_FROZEN_NONE, + MP_FROZEN_STR, + MP_FROZEN_MPY, +}; + +int mp_find_frozen_module(const char *str, size_t len, void **data); -- cgit v1.2.3