summaryrefslogtreecommitdiff
path: root/toke.c
diff options
context:
space:
mode:
authorFather Chrysostomos <sprout@cpan.org>2011-12-22 21:41:00 -0800
committerFather Chrysostomos <sprout@cpan.org>2011-12-24 09:25:17 -0800
commit3fff342746894147cd83bf8e339f63346475018a (patch)
tree937d56f67f7776316964c44a2b982d16afa52a88 /toke.c
parentc6b36e452c0b3d11d99efcc36f6a80394940f0c3 (diff)
downloadperl-3fff342746894147cd83bf8e339f63346475018a.tar.gz
Eliminate ‘negative’ features
Now that we have hints in $^H to indicate the default feature bun- dle, there is no need for entries in %^H that turn features off by their presence.
Diffstat (limited to 'toke.c')
-rw-r--r--toke.c13
1 files changed, 5 insertions, 8 deletions
diff --git a/toke.c b/toke.c
index 286eb96f9a..8e4d9e58b9 100644
--- a/toke.c
+++ b/toke.c
@@ -599,8 +599,7 @@ S_missingterm(pTHX_ char *s)
* Check whether the named feature is enabled.
*/
bool
-Perl_feature_is_enabled(pTHX_ const char *const name, STRLEN namelen,
- bool negate)
+Perl_feature_is_enabled(pTHX_ const char *const name, STRLEN namelen)
{
dVAR;
char he_name[8 + MAX_FEATURE_LEN] = "feature_";
@@ -609,15 +608,13 @@ Perl_feature_is_enabled(pTHX_ const char *const name, STRLEN namelen,
if (namelen > MAX_FEATURE_LEN)
return FALSE;
- if (negate) he_name[8] = 'n', he_name[9] = 'o';
- memcpy(&he_name[8 + 2*negate], name, namelen);
+ memcpy(&he_name[8], name, namelen);
return
- !cop_hints_fetch_pvn(
- PL_curcop, he_name, 8 + 2*negate + namelen, 0,
+ cop_hints_fetch_pvn(
+ PL_curcop, he_name, 8 + namelen, 0,
REFCOUNTED_HE_EXISTS
- )
- != !negate;
+ );
}
/*