]> git.vpit.fr Git - perl/modules/autovivification.git/commitdiff
Add support for PERL_OP_PARENT
authorVincent Pit <vince@profvince.com>
Sat, 4 Oct 2014 16:11:47 +0000 (18:11 +0200)
committerVincent Pit <vince@profvince.com>
Sat, 4 Oct 2014 16:11:47 +0000 (18:11 +0200)
This was introduced in perl 5.21.2.

autovivification.xs

index a36d0a22d46232090ae0b414f1476059f25a10fc..12dc5cc825c7b47de8bf4d391c926993d32d48a7 100644 (file)
 # define A_HAS_RPEEP A_HAS_PERL(5, 13, 5)
 #endif
 
+#ifndef OP_SIBLING
+# define OP_SIBLING(O) ((O)->op_sibling)
+#endif
+
 /* ... Thread safety and multiplicity ...................................... */
 
 /* Always safe when the workaround isn't needed */
@@ -929,7 +933,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(cUNOPo->op_first->op_sibling, OP_RV2HV, a_pp_rv2hv);
+    a_recheck_rv2xv(OP_SIBLING(cUNOPo->op_first), OP_RV2HV, a_pp_rv2hv);
    break;
  }
  o = old_ck(aTHX_ o);