mirror of
https://github.com/Perl/perl5.git
synced 2026-01-27 01:44:43 +00:00
remove now unneeded FEATURE_IS_ENABLED()
This commit is contained in:
parent
9f601cf3bb
commit
7599b8a978
@ -3459,10 +3459,6 @@ ATop |void |clone_params_del|NN CLONE_PARAMS *param
|
||||
: Used in perl.c and toke.c
|
||||
op |void |populate_isa |NN const char *name|STRLEN len|...
|
||||
|
||||
: Used in keywords.c and toke.c
|
||||
Xop |bool |feature_is_enabled|NN const char *const name \
|
||||
|STRLEN namelen
|
||||
|
||||
: Some static inline functions need predeclaration because they are used
|
||||
: inside other static inline functions.
|
||||
#if defined(PERL_CORE) || defined (PERL_EXT)
|
||||
|
||||
@ -39,13 +39,6 @@
|
||||
#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) \
|
||||
((CURRENT_HINTS \
|
||||
& HINT_LOCALIZE_HH) \
|
||||
? Perl_feature_is_enabled(aTHX_ STR_WITH_LEN(name)) : FALSE)
|
||||
|
||||
#define FEATURE_IS_ENABLED_MASK(mask) \
|
||||
((CURRENT_HINTS & HINT_LOCALIZE_HH) \
|
||||
? (PL_curcop->cop_features & (mask)) : FALSE)
|
||||
|
||||
3
proto.h
3
proto.h
@ -1029,9 +1029,6 @@ PERL_CALLCONV char* Perl_fbm_instr(pTHX_ unsigned char* big, unsigned char* bige
|
||||
#define PERL_ARGS_ASSERT_FBM_INSTR \
|
||||
assert(big); assert(bigend); assert(littlestr)
|
||||
|
||||
PERL_CALLCONV bool Perl_feature_is_enabled(pTHX_ const char *const name, STRLEN namelen);
|
||||
#define PERL_ARGS_ASSERT_FEATURE_IS_ENABLED \
|
||||
assert(name)
|
||||
PERL_CALLCONV SV* Perl_filter_add(pTHX_ filter_t funcp, SV* datasv);
|
||||
#define PERL_ARGS_ASSERT_FILTER_ADD
|
||||
PERL_CALLCONV void Perl_filter_del(pTHX_ filter_t funcp);
|
||||
|
||||
@ -290,13 +290,6 @@ print $h <<'EOH';
|
||||
#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) \
|
||||
((CURRENT_HINTS \
|
||||
& HINT_LOCALIZE_HH) \
|
||||
? Perl_feature_is_enabled(aTHX_ STR_WITH_LEN(name)) : FALSE)
|
||||
|
||||
#define FEATURE_IS_ENABLED_MASK(mask) \
|
||||
((CURRENT_HINTS & HINT_LOCALIZE_HH) \
|
||||
? (PL_curcop->cop_features & (mask)) : FALSE)
|
||||
|
||||
20
toke.c
20
toke.c
@ -606,26 +606,6 @@ S_missingterm(pTHX_ char *s, STRLEN len)
|
||||
|
||||
#include "feature.h"
|
||||
|
||||
/*
|
||||
* Check whether the named feature is enabled.
|
||||
*/
|
||||
bool
|
||||
Perl_feature_is_enabled(pTHX_ const char *const name, STRLEN namelen)
|
||||
{
|
||||
char he_name[8 + MAX_FEATURE_LEN] = "feature_";
|
||||
|
||||
PERL_ARGS_ASSERT_FEATURE_IS_ENABLED;
|
||||
|
||||
assert(CURRENT_FEATURE_BUNDLE == FEATURE_BUNDLE_CUSTOM);
|
||||
|
||||
if (namelen > MAX_FEATURE_LEN)
|
||||
return FALSE;
|
||||
memcpy(&he_name[8], name, namelen);
|
||||
|
||||
return cBOOL(cop_hints_fetch_pvn(PL_curcop, he_name, 8 + namelen, 0,
|
||||
REFCOUNTED_HE_EXISTS));
|
||||
}
|
||||
|
||||
/*
|
||||
* experimental text filters for win32 carriage-returns, utf16-to-utf8 and
|
||||
* utf16-to-utf8-reversed.
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user