diff options
| author | mux | 2014-03-25 00:25:27 +0200 |
|---|---|---|
| committer | mux | 2014-03-25 00:25:27 +0200 |
| commit | 89d45248ee5f47338774ca0c999af4299da55512 (patch) | |
| tree | e2d5600ca4f8afe38aae3fc5dcce7759a734fcc0 /stm/main.c | |
| parent | 4b2b7ceca7915d014a191d3776bc29bdbc5faf02 (diff) | |
Add mp_obj_module_register
* Add function to load static modules.
* Use module_register to pyb module.
Diffstat (limited to 'stm/main.c')
| -rw-r--r-- | stm/main.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/stm/main.c b/stm/main.c index 8279a9b7f..6ad311127 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; |
