summaryrefslogtreecommitdiff
path: root/cop.h
diff options
context:
space:
mode:
authorDavid Mitchell <davem@iabyn.com>2015-10-21 09:41:52 +0100
committerDavid Mitchell <davem@iabyn.com>2016-02-03 09:18:31 +0000
commit5e691bc619be723fd99b9cc9acc13d3030b412c5 (patch)
tree1a06b37e986ed1242d6d520602070d57e6d48d96 /cop.h
parent4ebe6e957149a0288810b6241653721d805397aa (diff)
downloadperl-5e691bc619be723fd99b9cc9acc13d3030b412c5.tar.gz
rename DEBUG_CX() to CX_DEBUG()
For consistency with the new naming convention for context-stack macros. Also, give it a cx arg rather than using CX_CUR()
Diffstat (limited to 'cop.h')
-rw-r--r--cop.h16
1 files changed, 8 insertions, 8 deletions
diff --git a/cop.h b/cop.h
index 94e58afa7c..208223f80f 100644
--- a/cop.h
+++ b/cop.h
@@ -930,16 +930,16 @@ struct block {
#define blk_loop cx_u.cx_blk.blk_u.blku_loop
#define blk_givwhen cx_u.cx_blk.blk_u.blku_givwhen
-#define DEBUG_CX(action) \
+#define CX_DEBUG(cx, action) \
DEBUG_l( \
Perl_deb(aTHX_ "CX %ld %s %s (scope %ld,%ld) (save %ld,%ld) at %s:%d\n",\
(long)cxstack_ix, \
action, \
- PL_block_type[CxTYPE(CX_CUR())], \
+ PL_block_type[CxTYPE(cx)], \
(long)PL_scopestack_ix, \
- (long)(CX_CUR()->blk_oldscopesp), \
+ (long)(cx->blk_oldscopesp), \
(long)PL_savestack_ix, \
- (long)(CX_CUR()->blk_oldsaveix), \
+ (long)(cx->blk_oldsaveix), \
__FILE__, __LINE__));
/* Enter a block. */
@@ -953,11 +953,11 @@ struct block {
cx->blk_gimme = (U8)gimme; \
cx->cx_u.cx_blk.blku_old_tmpsfloor = PL_tmps_floor; \
PL_tmps_floor = PL_tmps_ix; \
- DEBUG_CX("PUSH");
+ CX_DEBUG(cx, "PUSH");
/* Exit a block (RETURN and LAST). */
#define POPBLOCK(cx) \
- DEBUG_CX("POP"); \
+ CX_DEBUG(cx, "POP"); \
PL_curcop = cx->blk_oldcop, \
PL_markstack_ptr = PL_markstack + cx->blk_oldmarksp, \
PL_scopestack_ix = cx->blk_oldscopesp, \
@@ -971,8 +971,8 @@ struct block {
/* Continue a block elsewhere (NEXT and REDO). */
#define TOPBLOCK(cx) \
- DEBUG_CX("TOP"); \
- cx = CX_CUR(), \
+ cx = CX_CUR(); \
+ CX_DEBUG(cx, "TOP"); \
PL_stack_sp = PL_stack_base + cx->blk_oldsp, \
PL_markstack_ptr = PL_markstack + cx->blk_oldmarksp, \
PL_scopestack_ix = cx->blk_oldscopesp, \