From 2846acbffa436a8a6bda1f5b38257b700500bbf0 Mon Sep 17 00:00:00 2001 From: Father Chrysostomos Date: Thu, 22 Dec 2011 20:37:59 -0800 Subject: Use new feature-testing macros Instead of using FEATURE_IS_ENABLED("say"), etc., now use FEATURE_SAY_IS_ENABLED instead. These new macros, in feature.h, also check feature bundle hints in PL_hints, so we can start using those hints. Two commits ago, feature.pm started setting them. --- keywords.c | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) (limited to 'keywords.c') diff --git a/keywords.c b/keywords.c index a37752f34c..169a41c411 100644 --- a/keywords.c +++ b/keywords.c @@ -8,6 +8,7 @@ #define PERL_IN_KEYWORDS_C #include "perl.h" #include "keywords.h" +#include "feature.h" I32 Perl_keyword (pTHX_ const char *name, I32 len, bool all_keywords) @@ -416,7 +417,7 @@ Perl_keyword (pTHX_ const char *name, I32 len, bool all_keywords) case 'a': if (name[2] == 'y') { /* say */ - return (all_keywords || FEATURE_IS_ENABLED("say") ? KEY_say : 0); + return (all_keywords || FEATURE_SAY_IS_ENABLED ? KEY_say : 0); } goto unknown; @@ -940,7 +941,7 @@ Perl_keyword (pTHX_ const char *name, I32 len, bool all_keywords) if (name[2] == 'e' && name[3] == 'n') { /* when */ - return (all_keywords || FEATURE_IS_ENABLED("switch") ? KEY_when : 0); + return (all_keywords || FEATURE_SWITCH_IS_ENABLED ? KEY_when : 0); } goto unknown; @@ -1023,7 +1024,7 @@ Perl_keyword (pTHX_ const char *name, I32 len, bool all_keywords) name[3] == 'a' && name[4] == 'k') { /* break */ - return (all_keywords || FEATURE_IS_ENABLED("switch") ? -KEY_break : 0); + return (all_keywords || FEATURE_SWITCH_IS_ENABLED ? -KEY_break : 0); } goto unknown; @@ -1151,7 +1152,7 @@ Perl_keyword (pTHX_ const char *name, I32 len, bool all_keywords) name[3] == 'e' && name[4] == 'n') { /* given */ - return (all_keywords || FEATURE_IS_ENABLED("switch") ? KEY_given : 0); + return (all_keywords || FEATURE_SWITCH_IS_ENABLED ? KEY_given : 0); } goto unknown; @@ -1319,7 +1320,7 @@ Perl_keyword (pTHX_ const char *name, I32 len, bool all_keywords) if (name[3] == 't' && name[4] == 'e') { /* state */ - return (all_keywords || FEATURE_IS_ENABLED("state") ? KEY_state : 0); + return (all_keywords || FEATURE_STATE_IS_ENABLED ? KEY_state : 0); } goto unknown; @@ -1944,7 +1945,7 @@ Perl_keyword (pTHX_ const char *name, I32 len, bool all_keywords) name[5] == '_' && name[6] == '_') { /* __SUB__ */ - return (all_keywords || FEATURE_IS_ENABLED("__SUB__") ? -KEY___SUB__ : 0); + return (all_keywords || FEATURE___SUB___IS_ENABLED ? -KEY___SUB__ : 0); } goto unknown; @@ -2007,7 +2008,7 @@ Perl_keyword (pTHX_ const char *name, I32 len, bool all_keywords) name[5] == 'l' && name[6] == 't') { /* default */ - return (all_keywords || FEATURE_IS_ENABLED("switch") ? KEY_default : 0); + return (all_keywords || FEATURE_SWITCH_IS_ENABLED ? KEY_default : 0); } goto unknown; @@ -2805,7 +2806,7 @@ Perl_keyword (pTHX_ const char *name, I32 len, bool all_keywords) name[7] == 'e' && name[8] == 's') { /* evalbytes */ - return (all_keywords || FEATURE_IS_ENABLED("evalbytes") ? -KEY_evalbytes : 0); + return (all_keywords || FEATURE_EVALBYTES_IS_ENABLED ? -KEY_evalbytes : 0); } goto unknown; @@ -3440,5 +3441,5 @@ unknown: } /* Generated from: - * 76ce12941a02bdb120222155311eb8772ba4a4e8965a42ba347a077cac5b426e regen/keywords.pl + * 29732a698b229f9e5f475fbb191f71c335c9e8d05b6168fe29e61c34c4f10bd2 regen/keywords.pl * ex: set ro: */ -- cgit v1.2.1