Skip to content
Permalink
Browse files

Add require_false feature flag

  • Loading branch information...
dnmfarrell committed Jul 1, 2018
1 parent 1e98119 commit 66f43943f438f5bc7970dab0b7940e46c84909f5
Showing with 10 additions and 2 deletions.
  1. +7 −1 feature.h
  2. +2 −1 lib/feature.pm
  3. +1 −0 regen/feature.pl
@@ -29,7 +29,7 @@
& HINT_LOCALIZE_HH) \
? Perl_feature_is_enabled(aTHX_ STR_WITH_LEN(name)) : FALSE)
/* The longest string we pass in. */
#define MAX_FEATURE_LEN (sizeof("postderef_qq")-1)
#define MAX_FEATURE_LEN (sizeof("require_false")-1)

#define FEATURE_FC_IS_ENABLED \
( \
@@ -127,6 +127,12 @@
FEATURE_IS_ENABLED("myref") \
)

#define FEATURE_REQUIRE_FALSE_IS_ENABLED \
( \
CURRENT_FEATURE_BUNDLE == FEATURE_BUNDLE_CUSTOM && \
FEATURE_IS_ENABLED("require_false") \
)

#define FEATURE_UNICODE_IS_ENABLED \
( \
(CURRENT_FEATURE_BUNDLE >= FEATURE_BUNDLE_511 && \
@@ -21,6 +21,7 @@ our %feature = (
postderef_qq => 'feature_postderef_qq',
unicode_eval => 'feature_unieval',
declared_refs => 'feature_myref',
require_false => 'feature_require_false',
unicode_strings => 'feature_unicode',
);

@@ -30,7 +31,7 @@ our %feature_bundle = (
"5.15" => [qw(current_sub evalbytes fc say state switch unicode_eval unicode_strings)],
"5.23" => [qw(current_sub evalbytes fc postderef_qq say state switch unicode_eval unicode_strings)],
"5.27" => [qw(bitwise current_sub evalbytes fc postderef_qq say state switch unicode_eval unicode_strings)],
"all" => [qw(array_base bitwise current_sub declared_refs evalbytes fc postderef_qq refaliasing say signatures state switch unicode_eval unicode_strings)],
"all" => [qw(array_base bitwise current_sub declared_refs evalbytes fc postderef_qq refaliasing require_false say signatures state switch unicode_eval unicode_strings)],
"default" => [qw(array_base)],
);

@@ -36,6 +36,7 @@ BEGIN
unicode_strings => 'unicode',
fc => 'fc',
signatures => 'signatures',
require_false => 'require_false',
);

# NOTE: If a feature is ever enabled in a non-contiguous range of Perl

0 comments on commit 66f4394

Please sign in to comment.
You can’t perform that action at this time.