From 295ea12411ca12a41947de3113febb29e469ac4c Mon Sep 17 00:00:00 2001 From: Paul Sokolovsky Date: Sat, 21 Nov 2015 16:34:57 +0200 Subject: [PATCH] py/emitglue: Host definition of mp_verbose_flag. This may not seem like the ideal place, but is actually the only place in py/ where it gets referenced, so is just right. --- lib/utils/printf.c | 2 -- py/emitglue.c | 4 ++++ unix/main.c | 1 - 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/lib/utils/printf.c b/lib/utils/printf.c index 611ad2df4c..082b1c65a8 100644 --- a/lib/utils/printf.c +++ b/lib/utils/printf.c @@ -48,8 +48,6 @@ int vprintf(const char *fmt, va_list ap) { } #if MICROPY_DEBUG_PRINTERS -mp_uint_t mp_verbose_flag = 1; - int DEBUG_printf(const char *fmt, ...) { va_list ap; va_start(ap, fmt); diff --git a/py/emitglue.c b/py/emitglue.c index a0f0e004eb..e6f3fc16d8 100644 --- a/py/emitglue.c +++ b/py/emitglue.c @@ -45,6 +45,10 @@ #define DEBUG_OP_printf(...) (void)0 #endif +#if MICROPY_DEBUG_PRINTERS +mp_uint_t mp_verbose_flag = 0; +#endif + struct _mp_raw_code_t { mp_raw_code_kind_t kind : 3; mp_uint_t scope_flags : 7; diff --git a/unix/main.c b/unix/main.c index 26b7a13683..26618af3f7 100644 --- a/unix/main.c +++ b/unix/main.c @@ -51,7 +51,6 @@ // Command line options, with their defaults STATIC bool compile_only = false; STATIC uint emit_opt = MP_EMIT_OPT_NONE; -mp_uint_t mp_verbose_flag = 0; #if MICROPY_ENABLE_GC // Heap size of GC heap (if enabled)