diff options
author | Father Chrysostomos <sprout@cpan.org> | 2014-12-07 17:11:21 -0800 |
---|---|---|
committer | Father Chrysostomos <sprout@cpan.org> | 2014-12-07 17:32:36 -0800 |
commit | e6dae479a92dc835be9b026ea350a20b94199aa2 (patch) | |
tree | 5913265cf5fd1110d2a3844ea0ddecdc06c8d9ff /ext | |
parent | 1daa0c574de23f83ee2d6bba1bc312c165d72dee (diff) | |
download | perl-e6dae479a92dc835be9b026ea350a20b94199aa2.tar.gz |
Change OP_SIBLING to OpSIBLING
to match the existing convention (OpREFCNT, OpSLAB).
Dave Mitchell asked me to wait until after his multideref work
was merged.
Unfortunately, there are now CPAN modules using OP_SIBLING.
Diffstat (limited to 'ext')
-rw-r--r-- | ext/B/B.xs | 8 | ||||
-rw-r--r-- | ext/Devel-Peek/Peek.xs | 8 | ||||
-rw-r--r-- | ext/XS-APItest/APItest.xs | 32 | ||||
-rw-r--r-- | ext/arybase/arybase.xs | 10 |
4 files changed, 29 insertions, 29 deletions
diff --git a/ext/B/B.xs b/ext/B/B.xs index 14bd7163b7..66198e36a9 100644 --- a/ext/B/B.xs +++ b/ext/B/B.xs @@ -542,7 +542,7 @@ walkoptree(pTHX_ OP *o, const char *method, SV *ref) PUTBACK; perl_call_method(method, G_DISCARD); if (o && (o->op_flags & OPf_KIDS)) { - for (kid = ((UNOP*)o)->op_first; kid; kid = OP_SIBLING(kid)) { + for (kid = ((UNOP*)o)->op_first; kid; kid = OpSIBLING(kid)) { ref = walkoptree(aTHX_ kid, method, ref); } } @@ -568,7 +568,7 @@ oplist(pTHX_ OP *o, SV **SP) continue; case OP_SORT: if (o->op_flags & OPf_STACKED && o->op_flags & OPf_SPECIAL) { - OP *kid = OP_SIBLING(cLISTOPo->op_first); /* pass pushmark */ + OP *kid = OpSIBLING(cLISTOPo->op_first); /* pass pushmark */ kid = kUNOP->op_first; /* pass rv2gv */ kid = kUNOP->op_first; /* pass leave */ SP = oplist(aTHX_ kid->op_next, SP); @@ -1061,7 +1061,7 @@ next(o) if (op_methods[ix].type == op_offset_special) switch (ix) { case 1: /* B::OP::op_sibling */ - ret = make_op_object(aTHX_ OP_SIBLING(o)); + ret = make_op_object(aTHX_ OpSIBLING(o)); break; case 8: /* B::PMOP::pmreplstart */ @@ -1142,7 +1142,7 @@ next(o) { OP *kid; UV i = 0; - for (kid = ((LISTOP*)o)->op_first; kid; kid = OP_SIBLING(kid)) + for (kid = ((LISTOP*)o)->op_first; kid; kid = OpSIBLING(kid)) i++; ret = sv_2mortal(newSVuv(i)); } diff --git a/ext/Devel-Peek/Peek.xs b/ext/Devel-Peek/Peek.xs index 205b338936..7e64edeee9 100644 --- a/ext/Devel-Peek/Peek.xs +++ b/ext/Devel-Peek/Peek.xs @@ -362,12 +362,12 @@ S_ck_dump(pTHX_ OP *entersubop, GV *namegv, SV *cv) parent = entersubop; pm = cUNOPx(entersubop)->op_first; - if (!OP_HAS_SIBLING(pm)) { + if (!OpHAS_SIBLING(pm)) { parent = pm; pm = cUNOPx(pm)->op_first; } - first = OP_SIBLING(pm); - second = OP_SIBLING(first); + first = OpSIBLING(pm); + second = OpSIBLING(first); if (!second) { /* It doesn’t really matter what we return here, as this only occurs after yyerror. */ @@ -376,7 +376,7 @@ S_ck_dump(pTHX_ OP *entersubop, GV *namegv, SV *cv) /* we either have Dump($x): [pushmark]->[first]->[ex-cvop] * or Dump($x,1); [pushmark]->[first]->[second]->[ex-cvop] */ - if (!OP_HAS_SIBLING(second)) + if (!OpHAS_SIBLING(second)) second = NULL; if (first->op_type == OP_RV2AV || diff --git a/ext/XS-APItest/APItest.xs b/ext/XS-APItest/APItest.xs index dbb92d5812..dee9f2f4a7 100644 --- a/ext/XS-APItest/APItest.xs +++ b/ext/XS-APItest/APItest.xs @@ -405,9 +405,9 @@ THX_ck_entersub_args_scalars(pTHX_ OP *entersubop, GV *namegv, SV *ckobj) OP *aop = cUNOPx(entersubop)->op_first; PERL_UNUSED_ARG(namegv); PERL_UNUSED_ARG(ckobj); - if (!OP_HAS_SIBLING(aop)) + if (!OpHAS_SIBLING(aop)) aop = cUNOPx(aop)->op_first; - for (aop = OP_SIBLING(aop); OP_HAS_SIBLING(aop); aop = OP_SIBLING(aop)) { + for (aop = OpSIBLING(aop); OpHAS_SIBLING(aop); aop = OpSIBLING(aop)) { op_contextualize(aop, G_SCALAR); } return entersubop; @@ -421,13 +421,13 @@ THX_ck_entersub_multi_sum(pTHX_ OP *entersubop, GV *namegv, SV *ckobj) OP *pushop = cUNOPx(entersubop)->op_first; PERL_UNUSED_ARG(namegv); PERL_UNUSED_ARG(ckobj); - if (!OP_HAS_SIBLING(pushop)) { + if (!OpHAS_SIBLING(pushop)) { parent = pushop; pushop = cUNOPx(pushop)->op_first; } while (1) { - OP *aop = OP_SIBLING(pushop); - if (!OP_HAS_SIBLING(aop)) + OP *aop = OpSIBLING(pushop); + if (!OpHAS_SIBLING(aop)) break; /* cut out first arg */ op_sibling_splice(parent, pushop, 1, NULL); @@ -457,7 +457,7 @@ test_op_list_describe_part(SV *res, OP *o) if (o->op_flags & OPf_KIDS) { OP *k; sv_catpvs(res, "["); - for (k = cUNOPx(o)->op_first; k; k = OP_SIBLING(k)) + for (k = cUNOPx(o)->op_first; k; k = OpSIBLING(k)) test_op_list_describe_part(res, k); sv_catpvs(res, "]"); } else { @@ -564,12 +564,12 @@ THX_ck_entersub_establish_cleanup(pTHX_ OP *entersubop, GV *namegv, SV *ckobj) ck_entersub_args_proto(entersubop, namegv, ckobj); parent = entersubop; pushop = cUNOPx(entersubop)->op_first; - if(!OP_HAS_SIBLING(pushop)) { + if(!OpHAS_SIBLING(pushop)) { parent = pushop; pushop = cUNOPx(pushop)->op_first; } /* extract out first arg, then delete the rest of the tree */ - argop = OP_SIBLING(pushop); + argop = OpSIBLING(pushop); op_sibling_splice(parent, pushop, 1, NULL); op_free(entersubop); @@ -586,11 +586,11 @@ THX_ck_entersub_postinc(pTHX_ OP *entersubop, GV *namegv, SV *ckobj) ck_entersub_args_proto(entersubop, namegv, ckobj); parent = entersubop; pushop = cUNOPx(entersubop)->op_first; - if(!OP_HAS_SIBLING(pushop)) { + if(!OpHAS_SIBLING(pushop)) { parent = pushop; pushop = cUNOPx(pushop)->op_first; } - argop = OP_SIBLING(pushop); + argop = OpSIBLING(pushop); op_sibling_splice(parent, pushop, 1, NULL); op_free(entersubop); return newUNOP(OP_POSTINC, 0, @@ -605,13 +605,13 @@ THX_ck_entersub_pad_scalar(pTHX_ OP *entersubop, GV *namegv, SV *ckobj) SV *a0, *a1; ck_entersub_args_proto(entersubop, namegv, ckobj); pushop = cUNOPx(entersubop)->op_first; - if(!OP_HAS_SIBLING(pushop)) + if(!OpHAS_SIBLING(pushop)) pushop = cUNOPx(pushop)->op_first; - argop = OP_SIBLING(pushop); - if(argop->op_type != OP_CONST || OP_SIBLING(argop)->op_type != OP_CONST) + argop = OpSIBLING(pushop); + if(argop->op_type != OP_CONST || OpSIBLING(argop)->op_type != OP_CONST) croak("bad argument expression type for pad_scalar()"); a0 = cSVOPx_sv(argop); - a1 = cSVOPx_sv(OP_SIBLING(argop)); + a1 = cSVOPx_sv(OpSIBLING(argop)); switch(SvIV(a0)) { case 1: { SV *namesv = sv_2mortal(newSVpvs("$")); @@ -1219,8 +1219,8 @@ addissub_myck_add(pTHX_ OP *op) OP *aop, *bop; U8 flags; if (!(flag_svp && SvTRUE(*flag_svp) && (op->op_flags & OPf_KIDS) && - (aop = cBINOPx(op)->op_first) && (bop = OP_SIBLING(aop)) && - !OP_HAS_SIBLING(bop))) + (aop = cBINOPx(op)->op_first) && (bop = OpSIBLING(aop)) && + !OpHAS_SIBLING(bop))) return addissub_nxck_add(aTHX_ op); flags = op->op_flags; op_sibling_splice(op, NULL, 1, NULL); /* excise aop */ diff --git a/ext/arybase/arybase.xs b/ext/arybase/arybase.xs index e81e7cee6b..bcc902ab89 100644 --- a/ext/arybase/arybase.xs +++ b/ext/arybase/arybase.xs @@ -177,7 +177,7 @@ STATIC OP *ab_ck_sassign(pTHX_ OP *o) { o = (*ab_old_ck_sassign)(aTHX_ o); if (o->op_type == OP_SASSIGN && FEATURE_ARYBASE_IS_ENABLED) { OP *right = cBINOPx(o)->op_first; - OP *left = OP_SIBLING(right); + OP *left = OpSIBLING(right); if (left) ab_process_assignment(left, right); } return o; @@ -187,9 +187,9 @@ STATIC OP *ab_ck_aassign(pTHX_ OP *o) { o = (*ab_old_ck_aassign)(aTHX_ o); if (o->op_type == OP_AASSIGN && FEATURE_ARYBASE_IS_ENABLED) { OP *right = cBINOPx(o)->op_first; - OP *left = OP_SIBLING(right); - left = OP_SIBLING(cBINOPx(left)->op_first); - right = OP_SIBLING(cBINOPx(right)->op_first); + OP *left = OpSIBLING(right); + left = OpSIBLING(cBINOPx(left)->op_first); + right = OpSIBLING(cBINOPx(right)->op_first); ab_process_assignment(left, right); } return o; @@ -384,7 +384,7 @@ static OP *ab_ck_base(pTHX_ OP *o) /* Break the aelemfast optimisation */ if (o->op_type == OP_AELEM) { OP *const first = cBINOPo->op_first; - OP *second = OP_SIBLING(first); + OP *second = OpSIBLING(first); OP *newop; if (second->op_type == OP_CONST) { /* cut out second arg and replace it with a new unop which is |