This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Fix up get_regex_charset_name()
[perl5.git] / inline.h
index 501a264..f31ce6a 100644 (file)
--- a/inline.h
+++ b/inline.h
@@ -1892,7 +1892,8 @@ Used by the C<IS_SAFE_SYSCALL()> macro.
 */
 
 PERL_STATIC_INLINE bool
-Perl_is_safe_syscall(pTHX_ const char *pv, STRLEN len, const char *what, const char *op_name) {
+Perl_is_safe_syscall(pTHX_ const char *pv, STRLEN len, const char *what, const char *op_name)
+{
     /* While the Windows CE API provides only UCS-16 (or UTF-16) APIs
      * perl itself uses xce*() functions which accept 8-bit strings.
      */
@@ -1933,7 +1934,8 @@ then calling:
 #ifdef PERL_CORE
 
 PERL_STATIC_INLINE bool
-S_should_warn_nl(const char *pv) {
+S_should_warn_nl(const char *pv)
+{
     STRLEN len;
 
     PERL_ARGS_ASSERT_SHOULD_WARN_NL;
@@ -1981,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 */
@@ -2006,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.
@@ -2013,7 +2021,8 @@ Return false if any get magic is on the SV other than taint magic.
 */
 
 PERL_STATIC_INLINE bool
-Perl_sv_only_taint_gmagic(SV *sv) {
+Perl_sv_only_taint_gmagic(SV *sv)
+{
     MAGIC *mg = SvMAGIC(sv);
 
     PERL_ARGS_ASSERT_SV_ONLY_TAINT_GMAGIC;