diff options
| author | Dan Halbert <halbert@halwitz.org> | 2017-09-01 16:12:26 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2017-09-01 16:12:26 -0400 |
| commit | a0d0b27faf0bc76ede0fbc595f641fdceb04ac56 (patch) | |
| tree | 292c2748ad92abff8c41481acfb3e68965ff8139 /esp8266 | |
| parent | c01bf678fdca84ddc0d6c5f80ad60b5248f17cdc (diff) | |
Fix issue #207, esp8266 file operations problems (#222)
The frozen module `_boot.py` was not being loaded on restart
because `pyexec_frozen_module()` did not know about the new `.frozen`
pseudo-directory. Updated lower-level routine to look in the right place.
Also made ".frozen" and related values be `#define`s.
Diffstat (limited to 'esp8266')
| -rw-r--r-- | esp8266/main.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/esp8266/main.c b/esp8266/main.c index 4f41adb69..49c454e72 100644 --- a/esp8266/main.c +++ b/esp8266/main.c @@ -29,6 +29,7 @@ #include "py/nlr.h" #include "py/compile.h" +#include "py/frozenmod.h" #include "py/runtime0.h" #include "py/runtime.h" #include "py/stackctrl.h" @@ -98,8 +99,8 @@ STATIC void mp_reset(void) { mp_obj_list_append(mp_sys_path, MP_OBJ_NEW_QSTR(MP_QSTR_)); // current dir (or base dir of the script) mp_obj_list_append(mp_sys_path, MP_OBJ_NEW_QSTR(MP_QSTR__slash_lib)); mp_obj_list_append(mp_sys_path, MP_OBJ_NEW_QSTR(MP_QSTR__slash_)); - // Frozen modules are in their own pseudo-dir, ".frozen". - mp_obj_list_append(mp_sys_path, MP_OBJ_NEW_QSTR(MP_QSTR__dot_frozen)); + // Frozen modules are in their own pseudo-dir, e.g., ".frozen". + mp_obj_list_append(mp_sys_path, MP_OBJ_NEW_QSTR(MP_FROZEN_FAKE_DIR_QSTR)); mp_obj_list_init(mp_sys_argv, 0); MP_STATE_PORT(term_obj) = MP_OBJ_NULL; |
