py/showbc: Pass in an mp_print_t struct to all bytecode-print functions.

So the output can be redirected if needed.

Signed-off-by: Damien George <damien@micropython.org>
This commit is contained in:
Damien George
2020-09-11 17:22:28 +10:00
parent 50efce8174
commit 85f2b239d8
4 changed files with 109 additions and 112 deletions

View File

@@ -92,7 +92,7 @@ void mp_emit_glue_assign_bytecode(mp_raw_code_t *rc, const byte *code,
#endif
#if MICROPY_DEBUG_PRINTERS
if (mp_verbose_flag >= 2) {
mp_bytecode_print(rc, code, len, const_table);
mp_bytecode_print(&mp_plat_print, rc, code, len, const_table);
}
#endif
}