summaryrefslogtreecommitdiff
path: root/py/mpconfig.h
diff options
context:
space:
mode:
authorDamien George <damien.p.george@gmail.com>2019-01-04 17:09:41 +1100
committerDamien George <damien.p.george@gmail.com>2019-01-04 17:09:41 +1100
commit6d199344631b9706eab828fe29b795578a81c618 (patch)
tree92f52a6089aded0490c88c49d380923fb609bea2 /py/mpconfig.h
parentb33f108cdeb57c9d84e5a4eff5a46aa49c6dd558 (diff)
py: Get optional VM stack overflow check compiling and working again.
Changes to the layout of the bytecode header meant that this debug code was no longer compiling. This is now fixed and a new compile-time option is introduced, MICROPY_DEBUG_VM_STACK_OVERFLOW, to turn on this feature (which is disabled by default). This option is needed because more than one file needs to cooperate to make this check work.
Diffstat (limited to 'py/mpconfig.h')
-rw-r--r--py/mpconfig.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/py/mpconfig.h b/py/mpconfig.h
index 7b0d78914..6f1619127 100644
--- a/py/mpconfig.h
+++ b/py/mpconfig.h
@@ -409,6 +409,11 @@
#define MICROPY_DEBUG_VERBOSE (0)
#endif
+// Whether to enable a simple VM stack overflow check
+#ifndef MICROPY_DEBUG_VM_STACK_OVERFLOW
+#define MICROPY_DEBUG_VM_STACK_OVERFLOW (0)
+#endif
+
/*****************************************************************************/
/* Optimisations */