Change 30142 by [EMAIL PROTECTED] on 2007/02/05 23:52:23

        Make a dummy OPpPAD_STATE and a dummy PL_unitcheck_save available to
        pre 5.9.x.

Affected files ...

... //depot/perl/ext/B/B.xs#128 edit
... //depot/perl/ext/B/defsubs_h.PL#27 edit

Differences ...

==== //depot/perl/ext/B/B.xs#128 (text) ====
Index: perl/ext/B/B.xs
--- perl/ext/B/B.xs#127~29977~  2007-01-25 12:57:56.000000000 -0800
+++ perl/ext/B/B.xs     2007-02-05 15:52:23.000000000 -0800
@@ -589,6 +589,7 @@
     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 @@
 #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

==== //depot/perl/ext/B/defsubs_h.PL#27 (text) ====
Index: perl/ext/B/defsubs_h.PL
--- perl/ext/B/defsubs_h.PL#26~29663~   2007-01-02 08:05:02.000000000 -0800
+++ perl/ext/B/defsubs_h.PL     2007-02-05 15:52:23.000000000 -0800
@@ -53,6 +53,13 @@
  {
   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";
End of Patch.

Reply via email to