Skip to content

Commit 295ea12

Browse files
committed
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.
1 parent 72bd172 commit 295ea12

3 files changed

Lines changed: 4 additions & 3 deletions

File tree

lib/utils/printf.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,6 @@ int vprintf(const char *fmt, va_list ap) {
4848
}
4949

5050
#if MICROPY_DEBUG_PRINTERS
51-
mp_uint_t mp_verbose_flag = 1;
52-
5351
int DEBUG_printf(const char *fmt, ...) {
5452
va_list ap;
5553
va_start(ap, fmt);

py/emitglue.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,10 @@
4545
#define DEBUG_OP_printf(...) (void)0
4646
#endif
4747

48+
#if MICROPY_DEBUG_PRINTERS
49+
mp_uint_t mp_verbose_flag = 0;
50+
#endif
51+
4852
struct _mp_raw_code_t {
4953
mp_raw_code_kind_t kind : 3;
5054
mp_uint_t scope_flags : 7;

unix/main.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,6 @@
5151
// Command line options, with their defaults
5252
STATIC bool compile_only = false;
5353
STATIC uint emit_opt = MP_EMIT_OPT_NONE;
54-
mp_uint_t mp_verbose_flag = 0;
5554

5655
#if MICROPY_ENABLE_GC
5756
// Heap size of GC heap (if enabled)

0 commit comments

Comments
 (0)