diff options
author | Damien George <damien.p.george@gmail.com> | 2018-08-02 14:17:24 +1000 |
---|---|---|
committer | Damien George <damien.p.george@gmail.com> | 2018-08-02 14:17:24 +1000 |
commit | b630dfcc1dc027bd049b4af9d25180f82c4051d9 (patch) | |
tree | 30b3d17370dc50e85597dc7f9b4858c9ceb09ab8 /py/emitglue.c | |
parent | da2d2b6d884201f2cbb23f74c6c5557e30fb1f14 (diff) |
py: Fix compiling with debug enabled and make more use of DEBUG_printf.
DEBUG_printf and MICROPY_DEBUG_PRINTER is now used instead of normal
printf, and a fault is fixed in mp_obj_class_lookup with debugging enabled;
see issue #3999. Debugging can now be enabled on all ports including when
nan-boxing is used.
Diffstat (limited to 'py/emitglue.c')
-rw-r--r-- | py/emitglue.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/py/emitglue.c b/py/emitglue.c index a7fff0e0e..f75a57437 100644 --- a/py/emitglue.c +++ b/py/emitglue.c @@ -76,6 +76,9 @@ void mp_emit_glue_assign_bytecode(mp_raw_code_t *rc, const byte *code, #endif #ifdef DEBUG_PRINT + #if !MICROPY_DEBUG_PRINTERS + const size_t len = 0; + #endif DEBUG_printf("assign byte code: code=%p len=" UINT_FMT " flags=%x\n", code, len, (uint)scope_flags); #endif #if MICROPY_DEBUG_PRINTERS |