summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--op.c14
-rw-r--r--pp.c2
-rw-r--r--pp_ctl.c6
3 files changed, 11 insertions, 11 deletions
diff --git a/op.c b/op.c
index 442060f294..6e19ef4c18 100644
--- a/op.c
+++ b/op.c
@@ -1386,7 +1386,7 @@ S_find_and_forget_pmops(pTHX_ OP *o)
case OP_SPLIT:
case OP_MATCH:
case OP_QR:
- forget_pmop((PMOP*)o);
+ forget_pmop(cPMOPo);
}
if (o->op_flags & OPf_KIDS) {
@@ -7061,7 +7061,7 @@ Perl_pmruntime(pTHX_ OP *o, OP *expr, OP *repl, UV flags, I32 floor)
}
PL_hints |= HINT_BLOCK_SCOPE;
- pm = (PMOP*)o;
+ pm = cPMOPo;
assert(floor==0 || (pm->op_pmflags & PMf_HAS_CV));
if (is_compiletime) {
@@ -7147,7 +7147,7 @@ Perl_pmruntime(pTHX_ OP *o, OP *expr, OP *repl, UV flags, I32 floor)
* squirrel away expr in op_code_list without the peephole
* optimiser etc processing it for a second time */
OP *qr = newPMOP(OP_QR, 0);
- ((PMOP*)qr)->op_code_list = expr;
+ cPMOPx(qr)->op_code_list = expr;
/* handle the implicit sub{} wrapped round the qr/(?{..})/ */
SvREFCNT_inc_simple_void(PL_compcv);
@@ -8076,11 +8076,11 @@ Perl_newASSIGNOP(pTHX_ I32 flags, OP *left, I32 optype, OP *right)
OP *tmpop;
if (gvop) {
#ifdef USE_ITHREADS
- ((PMOP*)right)->op_pmreplrootu.op_pmtargetoff
+ cPMOPx(right)->op_pmreplrootu.op_pmtargetoff
= cPADOPx(gvop)->op_padix;
cPADOPx(gvop)->op_padix = 0; /* steal it */
#else
- ((PMOP*)right)->op_pmreplrootu.op_pmtargetgv
+ cPMOPx(right)->op_pmreplrootu.op_pmtargetgv
= MUTABLE_GV(cSVOPx(gvop)->op_sv);
cSVOPx(gvop)->op_sv = NULL; /* steal it */
#endif
@@ -8088,7 +8088,7 @@ Perl_newASSIGNOP(pTHX_ I32 flags, OP *left, I32 optype, OP *right)
left->op_private & OPpOUR_INTRO;
}
else {
- ((PMOP*)right)->op_pmreplrootu.op_pmtargetoff = left->op_targ;
+ cPMOPx(right)->op_pmreplrootu.op_pmtargetoff = left->op_targ;
left->op_targ = 0; /* steal it */
right->op_private |= OPpSPLIT_LEX;
}
@@ -13264,7 +13264,7 @@ Perl_ck_split(pTHX_ OP *o)
assert(kid->op_type == OP_MATCH || kid->op_type == OP_SPLIT);
- if (((PMOP *)kid)->op_pmflags & PMf_GLOBAL) {
+ if (kPMOP->op_pmflags & PMf_GLOBAL) {
Perl_ck_warner(aTHX_ packWARN(WARN_REGEXP),
"Use of /g modifier is meaningless in split");
}
diff --git a/pp.c b/pp.c
index 20df361f74..185d7b7b34 100644
--- a/pp.c
+++ b/pp.c
@@ -6059,7 +6059,7 @@ PP(pp_split)
const bool do_utf8 = DO_UTF8(sv);
const bool in_uni_8_bit = IN_UNI_8_BIT;
const char *strend = s + len;
- PMOP *pm = cPMOPx(PL_op);
+ PMOP *pm = cPMOP;
REGEXP *rx;
SV *dstr;
const char *m;
diff --git a/pp_ctl.c b/pp_ctl.c
index 88b1c4e918..f3e4f29f8f 100644
--- a/pp_ctl.c
+++ b/pp_ctl.c
@@ -78,7 +78,7 @@ PP(pp_regcreset)
PP(pp_regcomp)
{
dSP;
- PMOP *pm = (PMOP*)cLOGOP->op_other;
+ PMOP *pm = cPMOPx(cLOGOP->op_other);
SV **args;
int nargs;
REGEXP *re = NULL;
@@ -189,7 +189,7 @@ PP(pp_substcont)
{
dSP;
PERL_CONTEXT *cx = CX_CUR();
- PMOP * const pm = (PMOP*) cLOGOP->op_other;
+ PMOP * const pm = cPMOPx(cLOGOP->op_other);
SV * const dstr = cx->sb_dstr;
char *s = cx->sb_s;
char *m = cx->sb_m;
@@ -4957,7 +4957,7 @@ PP(pp_leavegiven)
STATIC PMOP *
S_make_matcher(pTHX_ REGEXP *re)
{
- PMOP *matcher = (PMOP *) newPMOP(OP_MATCH, OPf_WANT_SCALAR | OPf_STACKED);
+ PMOP *matcher = cPMOPx(newPMOP(OP_MATCH, OPf_WANT_SCALAR | OPf_STACKED));
PERL_ARGS_ASSERT_MAKE_MATCHER;