diff options
author | Paul Sokolovsky <pfalcon@users.sourceforge.net> | 2016-05-21 22:23:08 +0300 |
---|---|---|
committer | Paul Sokolovsky <pfalcon@users.sourceforge.net> | 2016-05-21 22:23:08 +0300 |
commit | 8a2970e13671211a66628364d40f91b97c50c791 (patch) | |
tree | ea45c195a75f820a8d02c3124154b59bc9830970 | |
parent | daa4793578cc218c6ed5c2527375214191613015 (diff) | |
download | micropython-8a2970e13671211a66628364d40f91b97c50c791.tar.gz micropython-8a2970e13671211a66628364d40f91b97c50c791.zip |
py/builtinimport: Unbreak minimal build.
These are workarounds required until frozen .mpy loading following standard
frozen modules code path.
-rw-r--r-- | py/builtinimport.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/py/builtinimport.c b/py/builtinimport.c index 5cff163f3b..ca78a15c1b 100644 --- a/py/builtinimport.c +++ b/py/builtinimport.c @@ -63,10 +63,12 @@ bool mp_obj_is_package(mp_obj_t module) { // Stat either frozen or normal module by a given path // (whatever is available, if at all). STATIC mp_import_stat_t mp_import_stat_any(const char *path) { + #if MICROPY_MODULE_FROZEN_STR mp_import_stat_t st = mp_frozen_stat(path); if (st != MP_IMPORT_STAT_NO_EXIST) { return st; } + #endif return mp_import_stat(path); } @@ -208,7 +210,7 @@ STATIC void do_load(mp_obj_t module_obj, vstr_t *file) { { void *modref; int frozen_type = mp_find_frozen_module(file_str, file->len, &modref); - #if MICROPY_PERSISTENT_CODE_LOAD + #if MICROPY_PERSISTENT_CODE_LOAD || MICROPY_MODULE_FROZEN_MPY if (frozen_type == MP_FROZEN_MPY) { do_execute_raw_code(module_obj, modref); return; |