Make a dummy OPpPAD_STATE and a dummy PL_unitcheck_save available to
authorNicholas Clark <nick@ccl4.org>
Mon, 5 Feb 2007 23:52:23 +0000 (23:52 +0000)
committerNicholas Clark <nick@ccl4.org>
Mon, 5 Feb 2007 23:52:23 +0000 (23:52 +0000)
pre 5.9.x.

p4raw-id: //depot/perl@30142

ext/B/B.xs
ext/B/defsubs_h.PL

index 75fb33b..02b1efb 100644 (file)
@@ -589,6 +589,7 @@ BOOT:
     specialsv_list[6] = (SV *) pWARN_STD;
 #if PERL_VERSION <= 8
 #  define CVf_ASSERTION        0
+#  define OPpPAD_STATE 0
 #endif
 #include "defsubs.h"
 }
@@ -597,7 +598,11 @@ BOOT:
 #define B_init_av()    PL_initav
 #define B_inc_gv()     PL_incgv
 #define B_check_av()   PL_checkav_save
-#define B_unitcheck_av()       PL_unitcheckav_save
+#if PERL_VERSION > 8
+#  define B_unitcheck_av()     PL_unitcheckav_save
+#else
+#  define B_unitcheck_av()     NULL
+#endif
 #define B_begin_av()   PL_beginav_save
 #define B_end_av()     PL_endav
 #define B_main_root()  PL_main_root
index 0e30e46..2bc0a1f 100644 (file)
@@ -53,6 +53,13 @@ foreach my $const (qw(
  {
   doconst($const);
  }
+
+if ($] < 5.009) {
+    # This is only present in 5.10, but it's useful to B::Deparse to be able
+    # to import a dummy value from B
+    doconst(OPpPAD_STATE);
+}
+
 foreach my $file (qw(op.h cop.h))
  {
   my $path = $^O eq 'MacOS' ? ":::$file" : "../../$file";