Skip to content

Commit

Permalink
py/gc: Fix debug printing of pointer.
Browse files Browse the repository at this point in the history
When DEBUG_printf is the standard printf, compilers require the value for
%p to be an actual pointer instead of an integer.
  • Loading branch information
stinos authored and dpgeorge committed Jan 30, 2021
1 parent c2b5bfc commit cb8e2f0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion py/gc.c
Expand Up @@ -294,7 +294,7 @@ STATIC void gc_sweep(void) {
}
#endif
free_tail = 1;
DEBUG_printf("gc_sweep(%p)\n", PTR_FROM_BLOCK(block));
DEBUG_printf("gc_sweep(%p)\n", (void *)PTR_FROM_BLOCK(block));
#if MICROPY_PY_GC_COLLECT_RETVAL
MP_STATE_MEM(gc_collected)++;
#endif
Expand Down

0 comments on commit cb8e2f0

Please sign in to comment.