diff options
| author | Damien George <damien@micropython.org> | 2021-12-17 23:35:32 +1100 |
|---|---|---|
| committer | Damien George <damien@micropython.org> | 2021-12-18 00:08:07 +1100 |
| commit | de43b500bdff465539d89c5004d9e8cb3849eab1 (patch) | |
| tree | 00e10489fa3b8dd9d785b60999a4239ee9aa0016 /ports/esp8266/main.c | |
| parent | 86394f70fcd7b9fa66ec952711e5d64557d81a1e (diff) | |
py/runtime: Allow initialising sys.path/argv with defaults.
If MICROPY_PY_SYS_PATH_ARGV_DEFAULTS is enabled (which it is by default)
then sys.path and sys.argv will be initialised and populated with default
values. This keeps all bare-metal ports aligned.
Signed-off-by: Damien George <damien@micropython.org>
Diffstat (limited to 'ports/esp8266/main.c')
| -rw-r--r-- | ports/esp8266/main.c | 6 |
1 files changed, 0 insertions, 6 deletions
diff --git a/ports/esp8266/main.c b/ports/esp8266/main.c index 14863a35b..5d7debced 100644 --- a/ports/esp8266/main.c +++ b/ports/esp8266/main.c @@ -52,14 +52,8 @@ STATIC void mp_reset(void) { mp_hal_init(); gc_init(heap, heap + sizeof(heap)); mp_init(); - mp_obj_list_init(mp_sys_path, 0); - #if MICROPY_MODULE_FROZEN - mp_obj_list_append(mp_sys_path, MP_OBJ_NEW_QSTR(MP_QSTR__dot_frozen)); - #endif - 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_)); - mp_obj_list_init(mp_sys_argv, 0); #if MICROPY_EMIT_XTENSA || MICROPY_EMIT_INLINE_XTENSA extern void esp_native_code_init(void); esp_native_code_init(); |
