summaryrefslogtreecommitdiff
path: root/peep.c
diff options
context:
space:
mode:
authorPaul "LeoNerd" Evans <leonerd@leonerd.org.uk>2022-08-11 15:47:55 +0100
committerPaul Evans <leonerd@leonerd.org.uk>2022-08-15 14:50:25 +0100
commit78178fbe70ffe948ca5d725d4e3faeed9ae1fb19 (patch)
tree396b5abc2617a6dc6fadda52706f5411d7f480e0 /peep.c
parentd69d9fd48a4b8345ba14f3569215a1f34c7707d5 (diff)
downloadperl-78178fbe70ffe948ca5d725d4e3faeed9ae1fb19.tar.gz
Use the cLISTOPx-family of macros instead of manual (LISTOP*) casting
Diffstat (limited to 'peep.c')
-rw-r--r--peep.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/peep.c b/peep.c
index 3d438d2acb..58031643f1 100644
--- a/peep.c
+++ b/peep.c
@@ -1317,7 +1317,7 @@ S_finalize_op(pTHX_ OP* o)
? kid
: OpSIBLING(kLISTOP->op_first));
- rop = (UNOP*)((LISTOP*)o)->op_last;
+ rop = (UNOP*)(cLISTOPo->op_last);
check_keys:
if (o->op_private & OPpLVAL_INTRO || rop->op_type != OP_RV2HV)
@@ -3687,11 +3687,11 @@ Perl_rpeep(pTHX_ OP *o)
if (o->op_private & OPpSORT_INPLACE)
break;
- enter = (LISTOP *) o->op_next;
+ enter = cLISTOPx(o->op_next);
if (!enter)
break;
if (enter->op_type == OP_NULL) {
- enter = (LISTOP *) enter->op_next;
+ enter = cLISTOPx(enter->op_next);
if (!enter)
break;
}
@@ -3699,11 +3699,11 @@ Perl_rpeep(pTHX_ OP *o)
for (...) just has an OP_GV. */
if (enter->op_type == OP_GV) {
gvop = (OP *) enter;
- enter = (LISTOP *) enter->op_next;
+ enter = cLISTOPx(enter->op_next);
if (!enter)
break;
if (enter->op_type == OP_RV2GV) {
- enter = (LISTOP *) enter->op_next;
+ enter = cLISTOPx(enter->op_next);
if (!enter)
break;
}
@@ -3721,7 +3721,7 @@ Perl_rpeep(pTHX_ OP *o)
|| expushmark->op_targ != OP_PUSHMARK)
break;
- exlist = (LISTOP *) OpSIBLING(expushmark);
+ exlist = cLISTOPx(OpSIBLING(expushmark));
if (!exlist || exlist->op_type != OP_NULL
|| exlist->op_targ != OP_LIST)
break;
@@ -3741,11 +3741,11 @@ Perl_rpeep(pTHX_ OP *o)
break;
}
- ourmark = ((LISTOP *)o)->op_first;
+ ourmark = cLISTOPo->op_first;
if (!ourmark || ourmark->op_type != OP_PUSHMARK)
break;
- ourlast = ((LISTOP *)o)->op_last;
+ ourlast = cLISTOPo->op_last;
if (!ourlast || ourlast->op_next != o)
break;