summaryrefslogtreecommitdiff
path: root/op.c
diff options
context:
space:
mode:
authorNicholas Clark <nick@ccl4.org>2006-04-02 11:17:58 +0000
committerNicholas Clark <nick@ccl4.org>2006-04-02 11:17:58 +0000
commit623e66097f3d3c76e4fbfed49657029a98953c17 (patch)
tree4304a16273ac0891e56eafbcf6a80baef63a7fdb /op.c
parent38ab35f8085a56081a4dbd8b974815dee28ebfd1 (diff)
downloadperl-623e66097f3d3c76e4fbfed49657029a98953c17.tar.gz
Abstract all reads/writes of the hints in COPs with 2 new macros,
CopHINTS_get() and CopHINTS_set(). p4raw-id: //depot/perl@27677
Diffstat (limited to 'op.c')
-rw-r--r--op.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/op.c b/op.c
index 130daf9809..fa84b938ee 100644
--- a/op.c
+++ b/op.c
@@ -2003,7 +2003,7 @@ Perl_block_end(pTHX_ I32 floor, OP *seq)
const int needblockscope = PL_hints & HINT_BLOCK_SCOPE;
OP* const retval = scalarseq(seq);
LEAVE_SCOPE(floor);
- PL_compiling.op_private = (U8)(PL_hints & HINT_PRIVATE_MASK);
+ CopHINTS_set(&PL_compiling, PL_hints);
if (needblockscope)
PL_hints |= HINT_BLOCK_SCOPE; /* propagate out */
pad_leavemy();
@@ -3931,11 +3931,11 @@ Perl_newSTATEOP(pTHX_ I32 flags, char *label, OP *o)
cop->op_ppaddr = PL_ppaddr[ OP_NEXTSTATE ];
}
cop->op_flags = (U8)flags;
- cop->op_private = (U8)(PL_hints & HINT_PRIVATE_MASK);
+ CopHINTS_set(cop, PL_hints);
#ifdef NATIVE_HINTS
cop->op_private |= NATIVE_HINTS;
#endif
- PL_compiling.op_private = cop->op_private;
+ CopHINTS_set(&PL_compiling, CopHINTS_get(cop));
cop->op_next = (OP*)cop;
if (label) {
@@ -5333,7 +5333,7 @@ Perl_newATTRSUB(pTHX_ I32 floor, OP *o, OP *proto, OP *attrs, OP *block)
call_list(oldscope, PL_beginav);
PL_curcop = &PL_compiling;
- PL_compiling.op_private = (U8)(PL_hints & HINT_PRIVATE_MASK);
+ CopHINTS_set(&PL_compiling, PL_hints);
LEAVE;
}
else if (strEQ(s, "END") && !PL_error_count) {