diff options
| author | Glenn Ruben Bakke <glennbakke@gmail.com> | 2017-02-07 22:26:13 +0100 |
|---|---|---|
| committer | Glenn Ruben Bakke <glennbakke@gmail.com> | 2017-02-07 22:26:13 +0100 |
| commit | 4cf7fd151e98a3d842eb5c9428545cb67ddd57ee (patch) | |
| tree | 947f265a2d498f4879bab3c7d19591133c56c1a0 /py/runtime.c | |
| parent | 9397583f6c99533fc4c0a2753126120a8552ba4c (diff) | |
| parent | 21f08524baf11e62384814b7cb8fcd2b5a8998fb (diff) | |
Merge branch 'master' into nrf52
Diffstat (limited to 'py/runtime.c')
| -rw-r--r-- | py/runtime.c | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/py/runtime.c b/py/runtime.c index 9d2c0ef46..e6aef21d7 100644 --- a/py/runtime.c +++ b/py/runtime.c @@ -85,8 +85,8 @@ void mp_init(void) { // optimization disabled by default MP_STATE_VM(mp_optimise_value) = 0; - // init global module stuff - mp_module_init(); + // init global module dict + mp_obj_dict_init(&MP_STATE_VM(mp_loaded_modules_dict), 3); // initialise the __main__ module mp_obj_dict_init(&MP_STATE_VM(dict_main), 1); @@ -105,6 +105,12 @@ void mp_init(void) { memset(MP_STATE_VM(fs_user_mount), 0, sizeof(MP_STATE_VM(fs_user_mount))); #endif + #if MICROPY_VFS + // initialise the VFS sub-system + MP_STATE_VM(vfs_cur) = NULL; + MP_STATE_VM(vfs_mount_table) = NULL; + #endif + #if MICROPY_PY_THREAD_GIL mp_thread_mutex_init(&MP_STATE_VM(gil_mutex)); #endif @@ -114,7 +120,7 @@ void mp_init(void) { void mp_deinit(void) { //mp_obj_dict_free(&dict_main); - mp_module_deinit(); + //mp_map_deinit(&MP_STATE_VM(mp_loaded_modules_map)); // call port specific deinitialization if any #ifdef MICROPY_PORT_INIT_FUNC |
