diff options
author | Karl Williamson <khw@cpan.org> | 2019-09-11 17:08:25 -0600 |
---|---|---|
committer | Karl Williamson <khw@cpan.org> | 2019-09-15 10:39:56 -0600 |
commit | 94b0cb42d04bb202dba31ef85db6c93b0c93ae6d (patch) | |
tree | 5ea9e4f2dde9ce670ec2babc72f9c638446553c7 /inline.h | |
parent | ffd62fc2fb74955cac5af41e7b3820e09877c3b4 (diff) | |
download | perl-94b0cb42d04bb202dba31ef85db6c93b0c93ae6d.tar.gz |
Fix up get_regex_charset_name()
This inline function should not be visible outside certain core (and
ext/re) functions. Make that happen.
Diffstat (limited to 'inline.h')
-rw-r--r-- | inline.h | 8 |
1 files changed, 7 insertions, 1 deletions
@@ -1983,11 +1983,15 @@ S_lossless_NV_to_IV(const NV nv, IV *ivp) /* ------------------ pp.c, regcomp.c, toke.c, universal.c ------------ */ +#if defined(PERL_IN_PP_C) || defined(PERL_IN_REGCOMP_C) || defined(PERL_IN_TOKE_C) || defined(PERL_IN_UNIVERSAL_C) + #define MAX_CHARSET_NAME_LENGTH 2 PERL_STATIC_INLINE const char * -get_regex_charset_name(const U32 flags, STRLEN* const lenp) +S_get_regex_charset_name(const U32 flags, STRLEN* const lenp) { + PERL_ARGS_ASSERT_GET_REGEX_CHARSET_NAME; + /* Returns a string that corresponds to the name of the regex character set * given by 'flags', and *lenp is set the length of that string, which * cannot exceed MAX_CHARSET_NAME_LENGTH characters */ @@ -2008,6 +2012,8 @@ get_regex_charset_name(const U32 flags, STRLEN* const lenp) return "?"; /* Unknown */ } +#endif + /* Return false if any get magic is on the SV other than taint magic. |