summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul "LeoNerd" Evans <leonerd@leonerd.org.uk>2022-08-11 15:53:07 +0100
committerPaul Evans <leonerd@leonerd.org.uk>2022-08-15 14:50:25 +0100
commit008ea6fc45fe9d4da4a15062e391deba35c72740 (patch)
tree83ef05979ac8bcd8911fec851881c8e200c03180
parent2a49eaa6d41eea5e47b3c9fa4b34e19e16e2726d (diff)
downloadperl-008ea6fc45fe9d4da4a15062e391deba35c72740.tar.gz
Use the cLOGOPx-family of macros instead of manual (LOGOP*) casting
-rw-r--r--op.c4
-rw-r--r--peep.c2
-rw-r--r--pp_ctl.c6
3 files changed, 6 insertions, 6 deletions
diff --git a/op.c b/op.c
index 9525dcd040..a8f4b654e3 100644
--- a/op.c
+++ b/op.c
@@ -8818,7 +8818,7 @@ Perl_newLOOPOP(pTHX_ I32 flags, I32 debuggable, OP *expr, OP *block)
{
assert(cUNOPo->op_first->op_type == OP_AND
|| cUNOPo->op_first->op_type == OP_OR);
- o->op_next = ((LOGOP*)cUNOPo->op_first)->op_other;
+ o->op_next = cLOGOPx(cUNOPo->op_first)->op_other;
}
if (o == listop)
@@ -9107,7 +9107,7 @@ Perl_newFOROP(pTHX_ I32 flags, OP *sv, OP *expr, OP *block, OP *cont)
* treated as min/max values by 'pp_enteriter'.
*/
const UNOP* const flip = (UNOP*)((UNOP*)cBINOPx(expr)->op_first)->op_first;
- LOGOP* const range = (LOGOP*) flip->op_first;
+ LOGOP* const range = cLOGOPx(flip->op_first);
OP* const left = range->op_first;
OP* const right = OpSIBLING(left);
LISTOP* listop;
diff --git a/peep.c b/peep.c
index e9041a36cd..61bc7455fe 100644
--- a/peep.c
+++ b/peep.c
@@ -3560,7 +3560,7 @@ Perl_rpeep(pTHX_ OP *o)
)
&& (o->op_next->op_flags & OPf_WANT) == OPf_WANT_VOID
) {
- o->op_next = ((LOGOP*)o->op_next)->op_other;
+ o->op_next = cLOGOPx(o->op_next)->op_other;
}
DEFER(cLOGOP->op_other);
o->op_opt = 1;
diff --git a/pp_ctl.c b/pp_ctl.c
index 6d6a45fc3d..8d9d28fad9 100644
--- a/pp_ctl.c
+++ b/pp_ctl.c
@@ -998,7 +998,7 @@ PP(pp_grepstart)
PUTBACK;
if (PL_op->op_type == OP_MAPSTART)
Perl_pp_pushmark(aTHX); /* push top */
- return ((LOGOP*)PL_op->op_next)->op_other;
+ return cLOGOPx(PL_op->op_next)->op_other;
}
/* pp_grepwhile() lives in pp_hot.c */
@@ -1161,7 +1161,7 @@ PP(pp_flip)
dSP;
if (GIMME_V == G_LIST) {
- RETURNOP(((LOGOP*)cUNOP->op_first)->op_other);
+ RETURNOP(cLOGOPx(cUNOP->op_first)->op_other);
}
else {
dTOPss;
@@ -1190,7 +1190,7 @@ PP(pp_flip)
else {
sv_setiv(targ, 0);
SP--;
- RETURNOP(((LOGOP*)cUNOP->op_first)->op_other);
+ RETURNOP(cLOGOPx(cUNOP->op_first)->op_other);
}
}
SvPVCLEAR(TARG);