feature.h: FEATURE_IS_ENABLED can use CURRENT_HINTS
authorFather Chrysostomos <sprout@cpan.org>
Fri, 23 Dec 2011 06:48:58 +0000 (22:48 -0800)
committerFather Chrysostomos <sprout@cpan.org>
Sat, 24 Dec 2011 17:25:19 +0000 (09:25 -0800)
feature.h
regen/feature.pl

index ce8d81b..e34c3d3 100644 (file)
--- a/feature.h
+++ b/feature.h
@@ -20,7 +20,7 @@
 #define CURRENT_FEATURE_BUNDLE (CURRENT_HINTS >> HINT_FEATURE_SHIFT)
 
 #define FEATURE_IS_ENABLED(name)                                       \
-       (((PL_curcop == &PL_compiling ? PL_hints : PL_curcop->cop_hints) \
+       ((CURRENT_HINTS                                                  \
           & HINT_LOCALIZE_HH)                                            \
            && Perl_feature_is_enabled(aTHX_ STR_WITH_LEN(name)))
 /* The longest string we pass in.  */
index 5875168..44861a2 100755 (executable)
@@ -216,7 +216,7 @@ print $h <<'EOH';
 #define CURRENT_FEATURE_BUNDLE (CURRENT_HINTS >> HINT_FEATURE_SHIFT)
 
 #define FEATURE_IS_ENABLED(name)                                       \
-       (((PL_curcop == &PL_compiling ? PL_hints : PL_curcop->cop_hints) \
+       ((CURRENT_HINTS                                                  \
           & HINT_LOCALIZE_HH)                                            \
            && Perl_feature_is_enabled(aTHX_ STR_WITH_LEN(name)))
 /* The longest string we pass in.  */