summaryrefslogtreecommitdiff
path: root/py
diff options
context:
space:
mode:
authorYonatan Goldschmidt <yon.goldschmidt@gmail.com>2019-12-25 09:27:38 +0200
committerDamien George <damien.p.george@gmail.com>2019-12-28 00:05:39 +1100
commit61d2b40ad56243585ac2bebef67aff10d4c5583c (patch)
treea845f6cd81f4734aeeae62c79aa20397d917b942 /py
parentaca8873bb841860c0b62d36afe42501eb4505199 (diff)
lib/utils/pyexec: Introduce MICROPY_REPL_INFO, wrap debug prints in it.
For the 3 ports that already make use of this feature (stm32, nrf and teensy) this doesn't make any difference, it just allows to disable it from now on. For other ports that use pyexec, this decreases code size because the debug printing code is dead (it can't be enabled) but the compiler can't deduce that, so code is still emitted.
Diffstat (limited to 'py')
-rw-r--r--py/mpconfig.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/py/mpconfig.h b/py/mpconfig.h
index 1e786f753..93d67accd 100644
--- a/py/mpconfig.h
+++ b/py/mpconfig.h
@@ -560,6 +560,11 @@
#define MICROPY_HELPER_REPL (0)
#endif
+// Allow enabling debug prints after each REPL line
+#ifndef MICROPY_REPL_INFO
+#define MICROPY_REPL_INFO (0)
+#endif
+
// Whether to include emacs-style readline behavior in REPL
#ifndef MICROPY_REPL_EMACS_KEYS
#define MICROPY_REPL_EMACS_KEYS (0)