From: Vincent Pit Date: Fri, 6 Feb 2015 12:17:37 +0000 (+0100) Subject: Really be compatible with the OP_PARENT feature X-Git-Tag: v0.15~24 X-Git-Url: http://git.vpit.fr/?p=perl%2Fmodules%2Fautovivification.git;a=commitdiff_plain;h=424fd5125232dfd072e9dee9b04eb8560ed471bf Really be compatible with the OP_PARENT feature OP_SIBLING() has been renamed to OpSIBLING() in perl 5.21.7. --- diff --git a/autovivification.xs b/autovivification.xs index f0e0047..852723b 100644 --- a/autovivification.xs +++ b/autovivification.xs @@ -29,8 +29,12 @@ # define A_HAS_RPEEP A_HAS_PERL(5, 13, 5) #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 /* ... Thread safety and multiplicity ...................................... */ @@ -933,7 +937,7 @@ STATIC OP *a_ck_xslice(pTHX_ OP *o) { case OP_HSLICE: old_ck = a_old_ck_hslice; if (hint & A_HINT_DO) - a_recheck_rv2xv(OP_SIBLING(cUNOPo->op_first), OP_RV2HV, a_pp_rv2hv); + a_recheck_rv2xv(OpSIBLING(cUNOPo->op_first), OP_RV2HV, a_pp_rv2hv); break; } o = old_ck(aTHX_ o);