diff options
author | Father Chrysostomos <sprout@cpan.org> | 2012-01-28 23:06:25 -0800 |
---|---|---|
committer | Father Chrysostomos <sprout@cpan.org> | 2012-01-28 23:35:14 -0800 |
commit | 035b6821e6e17ee4ea286a7a8332b86222a67695 (patch) | |
tree | 0b38daed0e1330946933f4575ebfa8f5196aecb6 | |
parent | 0865059d9cec0d198515152182d4283ab634748e (diff) | |
download | perl-035b6821e6e17ee4ea286a7a8332b86222a67695.tar.gz |
feature.h: Mask hints in CURRENT_FEATURE_BUNDLE
Otherwise CURRENT_FEATURE_BUNDLE will end up including any hints added
later that happen to use higher bits.
This was causing autobox to turn off all features, causing failures
for Dist::Zilla::PluginBundle::AVAR.
I’m not adding tests for this, as such tests would need constant
tweaking in future perl developement. What autobox is doing is
naughty and unsupported anyway.
-rw-r--r-- | feature.h | 3 | ||||
-rwxr-xr-x | regen/feature.pl | 3 |
2 files changed, 4 insertions, 2 deletions
@@ -17,7 +17,8 @@ #define CURRENT_HINTS \ (PL_curcop == &PL_compiling ? PL_hints : PL_curcop->cop_hints) -#define CURRENT_FEATURE_BUNDLE (CURRENT_HINTS >> HINT_FEATURE_SHIFT) +#define CURRENT_FEATURE_BUNDLE \ + ((CURRENT_HINTS & HINT_FEATURE_MASK) >> HINT_FEATURE_SHIFT) #define FEATURE_IS_ENABLED(name) \ ((CURRENT_HINTS \ diff --git a/regen/feature.pl b/regen/feature.pl index 05643d9474..2444ad118d 100755 --- a/regen/feature.pl +++ b/regen/feature.pl @@ -226,7 +226,8 @@ print $h <<'EOH'; #define CURRENT_HINTS \ (PL_curcop == &PL_compiling ? PL_hints : PL_curcop->cop_hints) -#define CURRENT_FEATURE_BUNDLE (CURRENT_HINTS >> HINT_FEATURE_SHIFT) +#define CURRENT_FEATURE_BUNDLE \ + ((CURRENT_HINTS & HINT_FEATURE_MASK) >> HINT_FEATURE_SHIFT) #define FEATURE_IS_ENABLED(name) \ ((CURRENT_HINTS \ |