]> git.vpit.fr Git - perl/modules/indirect.git/commitdiff
Add support for PERL_OP_PARENT
authorVincent Pit <vince@profvince.com>
Sun, 21 Sep 2014 19:04:31 +0000 (21:04 +0200)
committerVincent Pit <vince@profvince.com>
Sun, 21 Sep 2014 19:04:31 +0000 (21:04 +0200)
This was introduced in perl 5.21.2.

indirect.xs

index 1cdd3eb090c2e52d8abdcd1c27b0be76f452c3b8..de41fa61802e60fff95101fd70cea563d3328313 100644 (file)
 # define HvNAMELEN_get(H) strlen(HvNAME_get(H))
 #endif
 
 # 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)
 #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);
     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)
   mop = lop->op_last;
 
   if (!oop)