This is a live mirror of the Perl 5 development currently hosted at
https://github.com/perl/perl5
https://perl5.git.perl.org
/
perl5.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
charnames: Deprecate character names with spacing issues
[perl5.git]
/
feature.h
diff --git
a/feature.h
b/feature.h
index
ce8d81b
..
215a4d5
100644
(file)
--- a/
feature.h
+++ b/
feature.h
@@
-17,14
+17,24
@@
#define CURRENT_HINTS \
(PL_curcop == &PL_compiling ? PL_hints : PL_curcop->cop_hints)
#define CURRENT_HINTS \
(PL_curcop == &PL_compiling ? PL_hints : PL_curcop->cop_hints)
-#define CURRENT_FEATURE_BUNDLE (CURRENT_HINTS >> HINT_FEATURE_SHIFT)
+#define CURRENT_FEATURE_BUNDLE \
+ ((CURRENT_HINTS & HINT_FEATURE_MASK) >> HINT_FEATURE_SHIFT)
+/* Avoid using ... && Perl_feature_is_enabled(...) as that triggers a bug in
+ the HP-UX cc on PA-RISC */
#define FEATURE_IS_ENABLED(name) \
#define FEATURE_IS_ENABLED(name) \
- ((
(PL_curcop == &PL_compiling ? PL_hints : PL_curcop->cop_hints)
\
+ ((
CURRENT_HINTS
\
& HINT_LOCALIZE_HH) \
& HINT_LOCALIZE_HH) \
-
&& Perl_feature_is_enabled(aTHX_ STR_WITH_LEN(name))
)
+
? Perl_feature_is_enabled(aTHX_ STR_WITH_LEN(name)) : FALSE
)
/* The longest string we pass in. */
/* The longest string we pass in. */
-#define MAX_FEATURE_LEN (sizeof("unicode_strings")-1)
+#define MAX_FEATURE_LEN (sizeof("evalbytes")-1)
+
+#define FEATURE_FC_IS_ENABLED \
+ ( \
+ CURRENT_FEATURE_BUNDLE == FEATURE_BUNDLE_515 \
+ || (CURRENT_FEATURE_BUNDLE == FEATURE_BUNDLE_CUSTOM && \
+ FEATURE_IS_ENABLED("fc")) \
+ )
#define FEATURE_SAY_IS_ENABLED \
( \
#define FEATURE_SAY_IS_ENABLED \
( \
@@
-71,6
+81,12
@@
FEATURE_IS_ENABLED("__SUB__")) \
)
FEATURE_IS_ENABLED("__SUB__")) \
)
+#define FEATURE_LEXSUBS_IS_ENABLED \
+ ( \
+ CURRENT_FEATURE_BUNDLE == FEATURE_BUNDLE_CUSTOM && \
+ FEATURE_IS_ENABLED("lexsubs") \
+ )
+
#define FEATURE_UNIEVAL_IS_ENABLED \
( \
CURRENT_FEATURE_BUNDLE == FEATURE_BUNDLE_515 \
#define FEATURE_UNIEVAL_IS_ENABLED \
( \
CURRENT_FEATURE_BUNDLE == FEATURE_BUNDLE_515 \
@@
-107,6
+123,10
@@
S_enable_feature_bundle(pTHX_ SV *ver)
? FEATURE_BUNDLE_510 :
FEATURE_BUNDLE_DEFAULT
) << HINT_FEATURE_SHIFT;
? FEATURE_BUNDLE_510 :
FEATURE_BUNDLE_DEFAULT
) << HINT_FEATURE_SHIFT;
+ /* special case */
+ assert(PL_curcop == &PL_compiling);
+ if (FEATURE_UNICODE_IS_ENABLED) PL_hints |= HINT_UNI_8_BIT;
+ else PL_hints &= ~HINT_UNI_8_BIT;
}
#endif /* PERL_IN_OP_C */
}
#endif /* PERL_IN_OP_C */