From 8a96ebea75158987c1136f1a618d98cf387445fd Mon Sep 17 00:00:00 2001 From: Paul Sokolovsky Date: Fri, 27 Jun 2014 20:54:22 +0300 Subject: py: Move stack_ctrl_init() to mp_init(). As stack checking is enabled by default, ports which don't call stack_ctrl_init() are broken now (report RuntimeError on startup). Save them trouble and just init stack control framework in interpreter init. --- py/runtime.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'py/runtime.c') diff --git a/py/runtime.c b/py/runtime.c index b539984c0b..f08ff9ff40 100644 --- a/py/runtime.c +++ b/py/runtime.c @@ -45,6 +45,7 @@ #include "smallint.h" #include "objgenerator.h" #include "lexer.h" +#include "stackctrl.h" #if 0 // print debugging info #define DEBUG_PRINT (1) @@ -69,6 +70,8 @@ const mp_obj_module_t mp_module___main__ = { }; void mp_init(void) { + stack_ctrl_init(); + // call port specific initialization if any #ifdef MICROPY_PORT_INIT_FUNC MICROPY_PORT_INIT_FUNC; -- cgit v1.2.3