In perl.git, the branch blead has been updated

<http://perl5.git.perl.org/perl.git/commitdiff/cb74824085db788b8cbf6dbde3c1f1f39d978811?hp=4e0341d2ce817c9956f7f78e36bcaf8b764e18fc>

- Log -----------------------------------------------------------------
commit cb74824085db788b8cbf6dbde3c1f1f39d978811
Author: David Mitchell <[email protected]>
Date:   Mon Mar 30 15:53:07 2015 +0100

    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.
-----------------------------------------------------------------------

Summary of changes:
 op.c | 10 ++++------
 1 file changed, 4 insertions(+), 6 deletions(-)

diff --git a/op.c b/op.c
index 9404a47..ad0b0b0 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);
                }
            }

--
Perl5 Master Repository

Reply via email to