diff options
| author | Glenn Ruben Bakke <glennbakke@gmail.com> | 2017-02-07 22:27:32 +0100 |
|---|---|---|
| committer | Glenn Ruben Bakke <glennbakke@gmail.com> | 2017-02-07 22:27:32 +0100 |
| commit | 122d0430db4d103dfb8bc9958b7df4d9803038c8 (patch) | |
| tree | 856ac0d4950b0154cc6aae8cf022fd29b2402073 /py/runtime.c | |
| parent | 723943abde3e9de5e14ee40df5e0d5fe25352c97 (diff) | |
| parent | 4cf7fd151e98a3d842eb5c9428545cb67ddd57ee (diff) | |
Merge branch 'nrf52' into nrf5_no_sdk
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 |
