summaryrefslogtreecommitdiff
path: root/regen/feature.pl
diff options
context:
space:
mode:
Diffstat (limited to 'regen/feature.pl')
-rwxr-xr-xregen/feature.pl11
1 files changed, 9 insertions, 2 deletions
diff --git a/regen/feature.pl b/regen/feature.pl
index ab60389edd..32d7123187 100755
--- a/regen/feature.pl
+++ b/regen/feature.pl
@@ -209,13 +209,20 @@ for (@HintedBundles) {
print $h "#define FEATURE_BUNDLE_$key ", $count++, "\n";
}
-print $h <<EOH;
+print $h <<'EOH';
#define FEATURE_BUNDLE_CUSTOM (HINT_FEATURE_MASK >> HINT_FEATURE_SHIFT)
-#define CURRENT_HINTS \\
+#define CURRENT_HINTS \
(PL_curcop == &PL_compiling ? PL_hints : PL_curcop->cop_hints)
#define CURRENT_FEATURE_BUNDLE (CURRENT_HINTS >> HINT_FEATURE_SHIFT)
+#define FEATURE_IS_ENABLED(name) \
+ (((PL_curcop == &PL_compiling ? PL_hints : PL_curcop->cop_hints) \
+ & HINT_LOCALIZE_HH) \
+ && Perl_feature_is_enabled(aTHX_ STR_WITH_LEN(name)))
+/* The longest string we pass in. */
+#define MAX_FEATURE_LEN (sizeof("unicode_strings")-1)
+
EOH
for (