From: Vincent Pit Date: Fri, 6 Feb 2015 14:04:33 +0000 (+0100) Subject: Really be compatible with the OP_PARENT feature X-Git-Tag: v0.14~6 X-Git-Url: http://git.vpit.fr/?p=perl%2Fmodules%2FLexical-Types.git;a=commitdiff_plain;h=7795b7147f21cde09b27e90bc5893371f5e21fbe Really be compatible with the OP_PARENT feature OP_SIBLING() has been renamed to OpSIBLING() in perl 5.21.7. --- diff --git a/Types.xs b/Types.xs index 0cff8fa..4354476 100644 --- a/Types.xs +++ b/Types.xs @@ -39,8 +39,12 @@ # define HvNAMELEN_get(H) strlen(HvNAME_get(H)) #endif -#ifndef OP_SIBLING -# define OP_SIBLING(O) ((O)->op_sibling) +#ifndef OpSIBLING +# ifdef OP_SIBLING +# define OpSIBLING(O) OP_SIBLING(O) +# else +# define OpSIBLING(O) ((O)->op_sibling) +# endif #endif #ifndef SvREFCNT_inc_simple_void_NN @@ -862,11 +866,11 @@ STATIC void lt_peep_rec(pTHX_ OP *o, ptable *seen) { * Moreover, for non-special padrange ops (i.e. that aren't for * my (...) = @_), the first original padxv is its sibling or nephew. */ - OP *kid = OP_SIBLING(o); + OP *kid = OpSIBLING(o); if (kid->op_type == OP_NULL && kid->op_flags & OPf_KIDS) { kid = kUNOP->op_first; if (kid->op_type == OP_NULL) - kid = OP_SIBLING(kid); + kid = OpSIBLING(kid); } lt_maybe_padrange_setup(o, kid); } @@ -881,7 +885,7 @@ STATIC void lt_peep_rec(pTHX_ OP *o, ptable *seen) { && op->op_flags & OPf_SPECIAL) { const OP *start = cUNOPx(cBINOPo->op_last)->op_first; if (start->op_type == OP_PUSHMARK) - start = OP_SIBLING(start); + start = OpSIBLING(start); lt_maybe_padrange_setup(op, start); } break;