summaryrefslogtreecommitdiffstatshomepage
path: root/stm/main.c
diff options
context:
space:
mode:
authorDamien George <damien.p.george@gmail.com>2014-03-25 13:21:51 +0000
committerDamien George <damien.p.george@gmail.com>2014-03-25 13:21:51 +0000
commit1dfde891e3e26543da6d42215da6a23c32b0a8bc (patch)
treec6f8448d0279c8e5e8df277abec5cc4cdc3648ec /stm/main.c
parent24d527bf2229a0e75cd8409e009301eab4ff8b44 (diff)
parent89d45248ee5f47338774ca0c999af4299da55512 (diff)
downloadmicropython-1dfde891e3e26543da6d42215da6a23c32b0a8bc.tar.gz
micropython-1dfde891e3e26543da6d42215da6a23c32b0a8bc.zip
Merge pull request #373 from iabdalkader/module_register
Add mp_obj_module_register
Diffstat (limited to 'stm/main.c')
-rw-r--r--stm/main.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/stm/main.c b/stm/main.c
index 8279a9b7f4..6ad3111276 100644
--- a/stm/main.c
+++ b/stm/main.c
@@ -272,9 +272,8 @@ soft_reset:
rt_store_name(MP_QSTR_help, rt_make_function_n(0, pyb_help));
rt_store_name(MP_QSTR_open, rt_make_function_n(2, pyb_io_open));
- // we pre-import the pyb module
- // probably shouldn't do this, so we are compatible with CPython
- rt_store_name(MP_QSTR_pyb, (mp_obj_t)&pyb_module);
+ // load the pyb module
+ mp_obj_module_register(MP_QSTR_pyb, (mp_obj_t)&pyb_module);
// check if user switch held (initiates reset of filesystem)
bool reset_filesystem = false;