summaryrefslogtreecommitdiff
path: root/cop.h
diff options
context:
space:
mode:
authorNicholas Clark <nick@ccl4.org>2006-09-01 15:05:10 +0000
committerNicholas Clark <nick@ccl4.org>2006-09-01 15:05:10 +0000
commit006bba40b64d69fcc85f3e7a0fe4b845e93164c0 (patch)
treec750def4369bc917d9b2fdc096f32e338dc79bdc /cop.h
parent78c72037c327e2cd8ede6cf098324435a670ca67 (diff)
downloadperl-006bba40b64d69fcc85f3e7a0fe4b845e93164c0.tar.gz
Access cx->blk_sub.hasargs via a pair of macros (as it's about to
move) p4raw-id: //depot/perl@28772
Diffstat (limited to 'cop.h')
-rw-r--r--cop.h9
1 files changed, 6 insertions, 3 deletions
diff --git a/cop.h b/cop.h
index 5bc36bd6f7..c248eed639 100644
--- a/cop.h
+++ b/cop.h
@@ -278,10 +278,13 @@ struct block_sub {
* Note that the refcnt of the cv is incremented twice; The CX one is
* decremented by LEAVESUB, the other by LEAVE. */
+#define CX_SUB_HASARGS_SET(cx, v) ((cx)->blk_sub.hasargs = (v))
+#define CX_SUB_HASARGS_GET(cx) ((cx)->blk_sub.hasargs + 0)
+
#define PUSHSUB_BASE(cx) \
cx->blk_sub.cv = cv; \
cx->blk_sub.olddepth = CvDEPTH(cv); \
- cx->blk_sub.hasargs = hasargs; \
+ CX_SUB_HASARGS_SET(cx, hasargs); \
cx->blk_sub.retop = NULL; \
if (!CvDEPTH(cv)) { \
SvREFCNT_inc_simple_void_NN(cv); \
@@ -305,7 +308,7 @@ struct block_sub {
cx->blk_sub.cv = cv; \
cx->blk_sub.gv = gv; \
cx->blk_sub.retop = NULL; \
- cx->blk_sub.hasargs = 0; \
+ CX_SUB_HASARGS_SET(cx, 0); \
cx->blk_sub.dfoutgv = PL_defoutgv; \
SvREFCNT_inc_void(cx->blk_sub.dfoutgv)
@@ -326,7 +329,7 @@ struct block_sub {
#define POPSUB(cx,sv) \
STMT_START { \
- if (cx->blk_sub.hasargs) { \
+ if (CX_SUB_HASARGS_GET(cx)) { \
POP_SAVEARRAY(); \
/* abandon @_ if it got reified */ \
if (AvREAL(cx->blk_sub.argarray)) { \