summaryrefslogtreecommitdiff
path: root/keywords.c
diff options
context:
space:
mode:
authorFather Chrysostomos <sprout@cpan.org>2011-12-22 20:37:59 -0800
committerFather Chrysostomos <sprout@cpan.org>2011-12-24 09:25:17 -0800
commit2846acbffa436a8a6bda1f5b38257b700500bbf0 (patch)
tree387345b45ef14619880d4b8c9aa4c1a5f903c5bb /keywords.c
parente233f0c5ea875bcd70051a941babeb77361bdac1 (diff)
downloadperl-2846acbffa436a8a6bda1f5b38257b700500bbf0.tar.gz
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.
Diffstat (limited to 'keywords.c')
-rw-r--r--keywords.c19
1 files changed, 10 insertions, 9 deletions
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: */