mirror of
https://github.com/micropython/micropython.git
synced 2026-01-07 12:40:15 +01:00
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).
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user