summaryrefslogtreecommitdiff
path: root/feature.h
diff options
context:
space:
mode:
authorFather Chrysostomos <sprout@cpan.org>2012-01-28 23:06:25 -0800
committerFather Chrysostomos <sprout@cpan.org>2012-01-28 23:35:14 -0800
commit035b6821e6e17ee4ea286a7a8332b86222a67695 (patch)
tree0b38daed0e1330946933f4575ebfa8f5196aecb6 /feature.h
parent0865059d9cec0d198515152182d4283ab634748e (diff)
downloadperl-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.
Diffstat (limited to 'feature.h')
-rw-r--r--feature.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/feature.h b/feature.h
index 2d06450628..60bf41d6a5 100644
--- a/feature.h
+++ b/feature.h
@@ -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 \