diff options
author | Nicholas Clark <nick@ccl4.org> | 2012-07-23 13:15:51 +0200 |
---|---|---|
committer | Nicholas Clark <nick@ccl4.org> | 2012-07-24 10:24:18 +0200 |
commit | 675cfc4e22d24527748ce3230ae5fe5f3a561af7 (patch) | |
tree | 6999d95fe7ff579e7acf548ecab9c0af28ffaeee /ext/B/Makefile.PL | |
parent | 9489b85a1e34c77cea51e40f85aa783e62bd771b (diff) | |
download | perl-675cfc4e22d24527748ce3230ae5fe5f3a561af7.tar.gz |
Expose all CV flags matching qr/CVf_/ as constants in B.
Previously most were exposed as constants, but often B was not taught about
flags added to cv.h. Determining the flags by parsing cv.h also permits the
removal of various version-specific logic from the Makefile.PL
Diffstat (limited to 'ext/B/Makefile.PL')
-rw-r--r-- | ext/B/Makefile.PL | 14 |
1 files changed, 3 insertions, 11 deletions
diff --git a/ext/B/Makefile.PL b/ext/B/Makefile.PL index 70753188ae..312e4419f4 100644 --- a/ext/B/Makefile.PL +++ b/ext/B/Makefile.PL @@ -20,26 +20,17 @@ if ($core) { $headerpath = File::Spec->catdir($Config::Config{archlibexp}, "CORE"); } -my @names = qw(CVf_ANON CVf_CLONE CVf_CLONED CVf_CONST CVf_LVALUE CVf_METHOD - CVf_NODEBUG CVf_UNIQUE CVf_WEAKOUTSIDE - GVf_IMPORTED_AV GVf_IMPORTED_CV GVf_IMPORTED_HV GVf_IMPORTED_SV +my @names = qw(GVf_IMPORTED_AV GVf_IMPORTED_CV GVf_IMPORTED_HV GVf_IMPORTED_SV HEf_SVKEY SVTYPEMASK SVt_PVGV SVt_PVHV PAD_FAKELEX_ANON PAD_FAKELEX_MULTI); -if ($] >= 5.009) { - push @names, 'CVf_ISXSUB'; -} else { +if ($] < 5.009) { # Constant not present after 5.8.x push @names, 'AVf_REAL'; # This is only present in 5.10, but it's useful to B::Deparse to be able # to import a dummy value from B push @names, {name=>"OPpPAD_STATE", default=>["IV", "0"]}; -} - -if ($] < 5.011) { - # Constant not present after 5.10.x - push @names, 'CVf_LOCKED'; } # First element in each tuple is the file; second is a regex snippet @@ -47,6 +38,7 @@ if ($] < 5.011) { # from that file. If none, all symbols will be defined whose values # match the pattern below. foreach my $tuple (['cop.h'], + ['cv.h', 'CVf'], ['op.h'], ['op_reg_common.h','(?:(?:RXf_)?PMf_)'], ['regexp.h','RXf_'], |