summaryrefslogtreecommitdiffstatshomepage
path: root/py
diff options
context:
space:
mode:
Diffstat (limited to 'py')
-rw-r--r--py/emitglue.c6
-rw-r--r--py/misc.h2
2 files changed, 6 insertions, 2 deletions
diff --git a/py/emitglue.c b/py/emitglue.c
index 231e32ac2c..ed3b385d9f 100644
--- a/py/emitglue.c
+++ b/py/emitglue.c
@@ -96,9 +96,11 @@ void mp_emit_glue_assign_byte_code(mp_raw_code_t *rc, byte *code, uint len, uint
DEBUG_printf(" %02x", code[i]);
}
DEBUG_printf("\n");
-#if MICROPY_DEBUG_PRINTERS
- mp_byte_code_print(code, len);
#endif
+#if MICROPY_DEBUG_PRINTERS
+ if (mp_verbose_flag > 0) {
+ mp_byte_code_print(code, len);
+ }
#endif
}
diff --git a/py/misc.h b/py/misc.h
index 0c8161d100..5eb6624095 100644
--- a/py/misc.h
+++ b/py/misc.h
@@ -156,4 +156,6 @@ void vstr_vprintf(vstr_t *vstr, const char *fmt, va_list ap);
// Debugging helpers
int DEBUG_printf(const char *fmt, ...);
+extern uint mp_verbose_flag;
+
#endif // _INCLUDED_MINILIB_H