diff options
author | Damien George <damien.p.george@gmail.com> | 2014-08-04 10:05:16 +0100 |
---|---|---|
committer | Damien George <damien.p.george@gmail.com> | 2014-08-04 10:05:16 +0100 |
commit | 8dbbbbc793554f920cf352b0e67da46abe3974cf (patch) | |
tree | 93dccc679ac010c4087c5d9067fb8da3a98d6b8b /py | |
parent | 8362bffb2eed310d319b0b96c1b3305eff9c4417 (diff) | |
download | micropython-8dbbbbc793554f920cf352b0e67da46abe3974cf.tar.gz micropython-8dbbbbc793554f920cf352b0e67da46abe3974cf.zip |
Put call to qstr_init and mp_init_emergency_exc_buf in mp_init.
qstr_init is always called exactly before mp_init, so makes sense to
just have mp_init call it. Similarly with
mp_init_emergency_exception_buf. Doing this makes the ports simpler and
less error prone (ie they can no longer forget to call these).
Diffstat (limited to 'py')
-rw-r--r-- | py/runtime.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/py/runtime.c b/py/runtime.c index a478bb62fc..59e47c7ff7 100644 --- a/py/runtime.c +++ b/py/runtime.c @@ -70,8 +70,13 @@ const mp_obj_module_t mp_module___main__ = { }; void mp_init(void) { + qstr_init(); mp_stack_ctrl_init(); +#if MICROPY_ENABLE_EMERGENCY_EXCEPTION_BUF + mp_init_emergency_exception_buf(); +#endif + // call port specific initialization if any #ifdef MICROPY_PORT_INIT_FUNC MICROPY_PORT_INIT_FUNC; |