diff options
author | Yonatan Goldschmidt <yon.goldschmidt@gmail.com> | 2019-12-25 09:27:38 +0200 |
---|---|---|
committer | Damien George <damien.p.george@gmail.com> | 2019-12-28 00:05:39 +1100 |
commit | 61d2b40ad56243585ac2bebef67aff10d4c5583c (patch) | |
tree | a845f6cd81f4734aeeae62c79aa20397d917b942 /py | |
parent | aca8873bb841860c0b62d36afe42501eb4505199 (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.h | 5 |
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) |