summaryrefslogtreecommitdiff
path: root/inline.h
diff options
context:
space:
mode:
authorKarl Williamson <khw@cpan.org>2019-09-11 17:08:25 -0600
committerKarl Williamson <khw@cpan.org>2019-09-15 10:39:56 -0600
commit94b0cb42d04bb202dba31ef85db6c93b0c93ae6d (patch)
tree5ea9e4f2dde9ce670ec2babc72f9c638446553c7 /inline.h
parentffd62fc2fb74955cac5af41e7b3820e09877c3b4 (diff)
downloadperl-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.h8
1 files changed, 7 insertions, 1 deletions
diff --git a/inline.h b/inline.h
index 9d44bd4c95..f31ce6a8c9 100644
--- a/inline.h
+++ b/inline.h
@@ -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.