summaryrefslogtreecommitdiffstatshomepage
path: root/py/objmodule.c
diff options
context:
space:
mode:
authorDamien George <damien.p.george@gmail.com>2017-01-26 23:30:38 +1100
committerDamien George <damien.p.george@gmail.com>2017-01-26 23:30:38 +1100
commite9cb1f807762f8adc1f5b6220b616ce6daf1303f (patch)
tree3a1696118cdbc64e79bd896d3f03b82163dea4a8 /py/objmodule.c
parentbf51200bc10858552f3cc6989afe0fe51b57a4f2 (diff)
downloadmicropython-e9cb1f807762f8adc1f5b6220b616ce6daf1303f.tar.gz
micropython-e9cb1f807762f8adc1f5b6220b616ce6daf1303f.zip
py/objmodule: Move module init/deinit code into runtime functions.
They are one-line functions and having them inline in mp_init/mp_deinit eliminates the overhead of a function call, and matches how other state is initialised in mp_init.
Diffstat (limited to 'py/objmodule.c')
-rw-r--r--py/objmodule.c8
1 files changed, 0 insertions, 8 deletions
diff --git a/py/objmodule.c b/py/objmodule.c
index a0a179de4b..43bb36b98c 100644
--- a/py/objmodule.c
+++ b/py/objmodule.c
@@ -237,14 +237,6 @@ STATIC const mp_rom_map_elem_t mp_builtin_module_weak_links_table[] = {
MP_DEFINE_CONST_MAP(mp_builtin_module_weak_links_map, mp_builtin_module_weak_links_table);
#endif
-void mp_module_init(void) {
- mp_obj_dict_init(&MP_STATE_VM(mp_loaded_modules_dict), 3);
-}
-
-void mp_module_deinit(void) {
- //mp_map_deinit(&MP_STATE_VM(mp_loaded_modules_map));
-}
-
// returns MP_OBJ_NULL if not found
mp_obj_t mp_module_get(qstr module_name) {
mp_map_t *mp_loaded_modules_map = &MP_STATE_VM(mp_loaded_modules_dict).map;