diff options
author | Father Chrysostomos <sprout@cpan.org> | 2011-12-22 22:12:23 -0800 |
---|---|---|
committer | Father Chrysostomos <sprout@cpan.org> | 2011-12-24 09:25:18 -0800 |
commit | 4160ddbd34d65f63317a6e87331c497432389b1e (patch) | |
tree | 931a8758a9aa5a8ea0ff086680f160a4366de3f3 /regen | |
parent | 7d058bc9453370017e3a3e70a0897188891b03cb (diff) | |
download | perl-4160ddbd34d65f63317a6e87331c497432389b1e.tar.gz |
feature.h: Function for enabling bundles
Diffstat (limited to 'regen')
-rwxr-xr-x | regen/feature.pl | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/regen/feature.pl b/regen/feature.pl index 32d7123187..2763d0995f 100755 --- a/regen/feature.pl +++ b/regen/feature.pl @@ -271,8 +271,35 @@ EOH4 print $h <<EOH; #endif /* PERL_CORE or PERL_EXT */ + +#ifdef PERL_IN_OP_C +PERL_STATIC_INLINE void +S_enable_feature_bundle(pTHX_ SV *ver) +{ + SV *comp_ver = sv_newmortal(); + PL_hints = (PL_hints &~ HINT_FEATURE_MASK) + | ( EOH +for (reverse @HintedBundles[1..$#HintedBundles]) { # skip default + my $numver = $_; + if ($numver eq '5.10') { $numver = '5.009005' } # special case + else { $numver =~ s/\./.0/ } # 5.11 => 5.011 + (my $macrover = $_) =~ y/.//d; + print $h <<" EOK"; + (sv_setnv(comp_ver, $numver), + vcmp(ver, upg_version(comp_ver, FALSE)) >= 0) + ? FEATURE_BUNDLE_$macrover : + EOK +} + +print $h <<EOJ; + FEATURE_BUNDLE_DEFAULT + ) << HINT_FEATURE_SHIFT; +} +#endif /* PERL_IN_OP_C */ +EOJ + read_only_bottom_close_and_rename($h); |