summaryrefslogtreecommitdiff
path: root/op.c
diff options
context:
space:
mode:
authorDavid Mitchell <davem@iabyn.com>2015-03-30 15:53:07 +0100
committerDavid Mitchell <davem@iabyn.com>2015-03-30 15:53:07 +0100
commitcb74824085db788b8cbf6dbde3c1f1f39d978811 (patch)
treeebad14198484a435144f85bb3543fe31a0e32422 /op.c
parent4e0341d2ce817c9956f7f78e36bcaf8b764e18fc (diff)
downloadperl-cb74824085db788b8cbf6dbde3c1f1f39d978811.tar.gz
op.c: avoid direct op_sibling access
Since the introduction of OpSIBLING(), op_sibling_splice() etc, a few places in op.c have started directly accessing/manipulating op_sibling again. Use the higher-level macros/functions instead.
Diffstat (limited to 'op.c')
-rw-r--r--op.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/op.c b/op.c
index 9404a47ee3..ad0b0b006f 100644
--- a/op.c
+++ b/op.c
@@ -2654,7 +2654,7 @@ S_lvref(pTHX_ OP *o, I32 type)
case OP_RV2CV:
kid = cUNOPo->op_first;
if (kid->op_type == OP_NULL)
- kid = cUNOPx(kUNOP->op_first->op_sibling)
+ kid = cUNOPx(OpSIBLING(kUNOP->op_first))
->op_first;
o->op_private = OPpLVREF_CV;
if (kid->op_type == OP_GV)
@@ -10667,7 +10667,7 @@ Perl_ck_refassign(pTHX_ OP *o)
break;
case OP_RV2CV: {
OP * const kidparent =
- cUNOPx(cUNOPx(varop)->op_first)->op_first->op_sibling;
+ OpSIBLING(cUNOPx(cUNOPx(varop)->op_first)->op_first);
OP * const kid = cUNOPx(kidparent)->op_first;
o->op_private |= OPpLVREF_CV;
if (kid->op_type == OP_GV) {
@@ -10943,10 +10943,8 @@ Perl_ck_sort(pTHX_ OP *o)
else {
OP * const padop = newOP(OP_PADCV, 0);
padop->op_targ = off;
- cUNOPx(firstkid)->op_first = padop;
-#ifdef PERL_OP_PARENT
- padop->op_sibling = firstkid;
-#endif
+ /* replace the const op with the pad op */
+ op_sibling_splice(firstkid, NULL, 1, padop);
op_free(kid);
}
}