diff options
author | Nicholas Clark <nick@ccl4.org> | 2007-02-05 23:52:23 +0000 |
---|---|---|
committer | Nicholas Clark <nick@ccl4.org> | 2007-02-05 23:52:23 +0000 |
commit | e66636537be1375e175fdc55f8c556880390711f (patch) | |
tree | 5daf45b7dbc1a1fba1d9f9b174a4c4ee692a1e18 /ext/B | |
parent | 742dc32d6acf0f4dd57e97fd4c64104357557a1c (diff) | |
download | perl-e66636537be1375e175fdc55f8c556880390711f.tar.gz |
Make a dummy OPpPAD_STATE and a dummy PL_unitcheck_save available to
pre 5.9.x.
p4raw-id: //depot/perl@30142
Diffstat (limited to 'ext/B')
-rw-r--r-- | ext/B/B.xs | 7 | ||||
-rw-r--r-- | ext/B/defsubs_h.PL | 7 |
2 files changed, 13 insertions, 1 deletions
diff --git a/ext/B/B.xs b/ext/B/B.xs index 75fb33bf32..02b1efbb6d 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 0e30e46684..2bc0a1f270 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"; |