summaryrefslogtreecommitdiffstatshomepage
path: root/py/runtime.c
diff options
context:
space:
mode:
authorPaul Sokolovsky <pfalcon@users.sourceforge.net>2014-06-27 20:54:22 +0300
committerPaul Sokolovsky <pfalcon@users.sourceforge.net>2014-06-27 21:02:04 +0300
commit8a96ebea75158987c1136f1a618d98cf387445fd (patch)
treed6ec8848a10d6f32c268c7814cbb4fa6aac7843d /py/runtime.c
parent64c58403efc8f7c4d95f8bd18c3afc86fa792fcc (diff)
downloadmicropython-8a96ebea75158987c1136f1a618d98cf387445fd.tar.gz
micropython-8a96ebea75158987c1136f1a618d98cf387445fd.zip
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.
Diffstat (limited to 'py/runtime.c')
-rw-r--r--py/runtime.c3
1 files changed, 3 insertions, 0 deletions
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;