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).
This commit is contained in:
Damien George
2016-01-31 22:24:16 +00:00
parent 0699c6bf9e
commit 0a2e9650f5
16 changed files with 148 additions and 50 deletions

View File

@@ -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);