From: Nicholas Clark Date: Mon, 5 Feb 2007 23:52:23 +0000 (+0000) Subject: Make a dummy OPpPAD_STATE and a dummy PL_unitcheck_save available to X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=e66636537be1375e175fdc55f8c556880390711f;p=p5sagit%2Fp5-mst-13.2.git Make a dummy OPpPAD_STATE and a dummy PL_unitcheck_save available to pre 5.9.x. p4raw-id: //depot/perl@30142 --- diff --git a/ext/B/B.xs b/ext/B/B.xs index 75fb33b..02b1efb 100644 --- a/ext/B/B.xs +++ b/ext/B/B.xs @@ -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 diff --git a/ext/B/defsubs_h.PL b/ext/B/defsubs_h.PL index 0e30e46..2bc0a1f 100644 --- a/ext/B/defsubs_h.PL +++ b/ext/B/defsubs_h.PL @@ -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";