From: Vincent Pit Date: Sun, 21 Sep 2014 19:04:31 +0000 (+0200) Subject: Add support for PERL_OP_PARENT X-Git-Tag: v0.32~3 X-Git-Url: http://git.vpit.fr/?a=commitdiff_plain;h=3ce3f8f7be47150f9d727ef67cb8bb7be039e68d;p=perl%2Fmodules%2Findirect.git Add support for PERL_OP_PARENT This was introduced in perl 5.21.2. --- diff --git a/indirect.xs b/indirect.xs index 1cdd3eb..de41fa6 100644 --- a/indirect.xs +++ b/indirect.xs @@ -63,6 +63,10 @@ # define HvNAMELEN_get(H) strlen(HvNAME_get(H)) #endif +#ifndef OP_SIBLING +# define OP_SIBLING(O) ((O)->op_sibling) +#endif + #define I_HAS_PERL(R, V, S) (PERL_REVISION > (R) || (PERL_REVISION == (R) && (PERL_VERSION > (V) || (PERL_VERSION == (V) && (PERL_SUBVERSION >= (S)))))) #if I_HAS_PERL(5, 10, 0) || defined(PL_parser) @@ -822,7 +826,7 @@ STATIC OP *indirect_ck_entersub(pTHX_ OP *o) { goto done; oop = lop->op_first; } while (oop->op_type != OP_PUSHMARK); - oop = oop->op_sibling; + oop = OP_SIBLING(oop); mop = lop->op_last; if (!oop)