summaryrefslogtreecommitdiff
path: root/pp.h
diff options
context:
space:
mode:
authorDavid Mitchell <davem@iabyn.com>2015-11-28 17:09:13 +0000
committerDavid Mitchell <davem@iabyn.com>2015-11-28 17:09:13 +0000
commitac07059afc757c4489adb6742202b936db323432 (patch)
tree0f7f5729ac86d994dbac809968c80d4324331085 /pp.h
parent534c402b078fa982333009833073f52917b61b71 (diff)
downloadperl-ac07059afc757c4489adb6742202b936db323432.tar.gz
FOOMARK debugging macros: fix %d cast; only -Dsv
The debugging variants of POPMARK() etc: use %IVdf rather than %d to avoid compiler warnings when sizeof(IV) != sizeof(int); also, make these macros trigger only under -Dsv rather than just -Ds (-v is the verbose variant).
Diffstat (limited to 'pp.h')
-rw-r--r--pp.h20
1 files changed, 12 insertions, 8 deletions
diff --git a/pp.h b/pp.h
index 60fe9ee1f8..61c3c3e181 100644
--- a/pp.h
+++ b/pp.h
@@ -62,26 +62,30 @@ Refetch the stack pointer. Used after a callback. See L<perlcall>.
if (UNLIKELY((mark_stack_entry = ++PL_markstack_ptr) == PL_markstack_max)) \
mark_stack_entry = markstack_grow(); \
*mark_stack_entry = (I32)((p) - PL_stack_base); \
- DEBUG_s(PerlIO_printf(Perl_debug_log, "MARK push %p %d\n", \
- PL_markstack_ptr, *mark_stack_entry)); \
+ DEBUG_s(DEBUG_v(PerlIO_printf(Perl_debug_log, \
+ "MARK push %p %"IVdf"\n", \
+ PL_markstack_ptr, (IV)*mark_stack_entry))); \
} STMT_END
# define TOPMARK \
({ \
- DEBUG_s(PerlIO_printf(Perl_debug_log, "MARK top %p %d\n", \
- PL_markstack_ptr, *PL_markstack_ptr)); \
+ DEBUG_s(DEBUG_v(PerlIO_printf(Perl_debug_log, \
+ "MARK top %p %"IVdf"\n", \
+ PL_markstack_ptr, (IV)*PL_markstack_ptr))); \
*PL_markstack_ptr; \
})
# define POPMARK \
({ \
- DEBUG_s(PerlIO_printf(Perl_debug_log, "MARK pop %p %d\n", \
- (PL_markstack_ptr-1), *(PL_markstack_ptr-1))); \
+ DEBUG_s(DEBUG_v(PerlIO_printf(Perl_debug_log, \
+ "MARK pop %p %"IVdf"\n", \
+ (PL_markstack_ptr-1), (IV)*(PL_markstack_ptr-1)))); \
assert((PL_markstack_ptr > PL_markstack) || !"MARK underflow");\
*PL_markstack_ptr--; \
})
# define INCMARK \
({ \
- DEBUG_s(PerlIO_printf(Perl_debug_log, "MARK inc %p %d\n", \
- (PL_markstack_ptr+1), *(PL_markstack_ptr+1))); \
+ DEBUG_s(DEBUG_v(PerlIO_printf(Perl_debug_log, \
+ "MARK inc %p %"IVdf"\n", \
+ (PL_markstack_ptr+1), (IV)*(PL_markstack_ptr+1)))); \
*PL_markstack_ptr++; \
})
#else