From 7d058bc9453370017e3a3e70a0897188891b03cb Mon Sep 17 00:00:00 2001 From: Father Chrysostomos Date: Thu, 22 Dec 2011 21:42:54 -0800 Subject: Move FEATURE_IS_ENABLED to feature.h MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit It makes little sense to have it in perl.h any more. (Until recently, feature.h didn’t exist.) --- feature.h | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'feature.h') diff --git a/feature.h b/feature.h index 31547fbcff..1cbd0478e5 100644 --- a/feature.h +++ b/feature.h @@ -19,6 +19,13 @@ (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) + #define FEATURE_SAY_IS_ENABLED \ ( \ (CURRENT_FEATURE_BUNDLE >= FEATURE_BUNDLE_510 && \ -- cgit v1.2.1