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:
Damien George
2014-08-04 10:05:16 +01:00
parent 8362bffb2e
commit 8dbbbbc793
8 changed files with 14 additions and 22 deletions

View File

@@ -278,11 +278,7 @@ int main(int argc, char **argv) {
char *heap = malloc(heap_size);
gc_init(heap, heap + heap_size);
#endif
#if MICROPY_ENABLE_EMERGENCY_EXCEPTION_BUF
mp_init_emergency_exception_buf();
#endif
qstr_init();
mp_init();
char *home = getenv("HOME");