This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Change name of _utf8_to_uvchr_buf()
authorKarl Williamson <khw@cpan.org>
Tue, 10 Sep 2019 17:12:59 +0000 (11:12 -0600)
committerKarl Williamson <khw@cpan.org>
Sun, 15 Sep 2019 16:39:56 +0000 (10:39 -0600)
A function name with a leading underscore is not legal in C.  Instead
add a suffix to differentiate this name from an otherwise identical one.

embed.fnc
embed.h
inline.h
proto.h
utf8.c
utf8.h

index 8f6b7fe..1bf9e62 100644 (file)
--- a/embed.fnc
+++ b/embed.fnc
@@ -2059,7 +2059,7 @@ ApdD      |UV     |utf8_to_uvchr  |NN const U8 *s|NULLOK STRLEN *retlen
 CbpdD  |UV     |utf8_to_uvuni  |NN const U8 *s|NULLOK STRLEN *retlen
 CbpD   |UV     |valid_utf8_to_uvuni    |NN const U8 *s|NULLOK STRLEN *retlen
 AMpd   |UV     |utf8_to_uvchr_buf      |NN const U8 *s|NN const U8 *send|NULLOK STRLEN *retlen
-Cip    |UV     |_utf8_to_uvchr_buf     |NN const U8 *s|NN const U8 *send|NULLOK STRLEN *retlen
+Cip    |UV     |utf8_to_uvchr_buf_helper|NN const U8 *s|NN const U8 *send|NULLOK STRLEN *retlen
 CpdD   |UV     |utf8_to_uvuni_buf      |NN const U8 *s|NN const U8 *send|NULLOK STRLEN *retlen
 p      |bool   |check_utf8_print       |NN const U8 *s|const STRLEN len
 
diff --git a/embed.h b/embed.h
index 0218331..4ce22a5 100644 (file)
--- a/embed.h
+++ b/embed.h
@@ -45,7 +45,6 @@
 #define _to_utf8_lower_flags(a,b,c,d,e,f,g)    Perl__to_utf8_lower_flags(aTHX_ a,b,c,d,e,f,g)
 #define _to_utf8_title_flags(a,b,c,d,e,f,g)    Perl__to_utf8_title_flags(aTHX_ a,b,c,d,e,f,g)
 #define _to_utf8_upper_flags(a,b,c,d,e,f,g)    Perl__to_utf8_upper_flags(aTHX_ a,b,c,d,e,f,g)
-#define _utf8_to_uvchr_buf(a,b,c)      Perl__utf8_to_uvchr_buf(aTHX_ a,b,c)
 #define _utf8n_to_uvchr_msgs_helper    Perl__utf8n_to_uvchr_msgs_helper
 #define amagic_call(a,b,c,d)   Perl_amagic_call(aTHX_ a,b,c,d)
 #define amagic_deref_call(a,b) Perl_amagic_deref_call(aTHX_ a,b)
 #define utf8_length(a,b)       Perl_utf8_length(aTHX_ a,b)
 #define utf8_to_bytes(a,b)     Perl_utf8_to_bytes(aTHX_ a,b)
 #define utf8_to_uvchr(a,b)     Perl_utf8_to_uvchr(aTHX_ a,b)
+#define utf8_to_uvchr_buf_helper(a,b,c)        Perl_utf8_to_uvchr_buf_helper(aTHX_ a,b,c)
 #ifndef NO_MATHOMS
 #define utf8_to_uvuni(a,b)     Perl_utf8_to_uvuni(aTHX_ a,b)
 #endif
index 5f4fc01..a55f19f 100644 (file)
--- a/inline.h
+++ b/inline.h
@@ -1843,9 +1843,9 @@ Perl_utf8n_to_uvchr_msgs(const U8 *s,
 }
 
 PERL_STATIC_INLINE UV
-Perl__utf8_to_uvchr_buf(pTHX_ const U8 *s, const U8 *send, STRLEN *retlen)
+Perl_utf8_to_uvchr_buf_helper(pTHX_ const U8 *s, const U8 *send, STRLEN *retlen)
 {
-    PERL_ARGS_ASSERT__UTF8_TO_UVCHR_BUF;
+    PERL_ARGS_ASSERT_UTF8_TO_UVCHR_BUF_HELPER;
 
     assert(s < send);
 
diff --git a/proto.h b/proto.h
index 4a3e0aa..1f062e0 100644 (file)
--- a/proto.h
+++ b/proto.h
@@ -148,11 +148,6 @@ PERL_CALLCONV UV   Perl__to_utf8_title_flags(pTHX_ const U8 *p, const U8* e, U8* u
 PERL_CALLCONV UV       Perl__to_utf8_upper_flags(pTHX_ const U8 *p, const U8 *e, U8* ustrp, STRLEN *lenp, bool flags, const char * const file, const int line);
 #define PERL_ARGS_ASSERT__TO_UTF8_UPPER_FLAGS  \
        assert(p); assert(ustrp); assert(file)
-#ifndef PERL_NO_INLINE_FUNCTIONS
-PERL_STATIC_INLINE UV  Perl__utf8_to_uvchr_buf(pTHX_ const U8 *s, const U8 *send, STRLEN *retlen);
-#define PERL_ARGS_ASSERT__UTF8_TO_UVCHR_BUF    \
-       assert(s); assert(send)
-#endif
 PERL_CALLCONV UV       Perl__utf8n_to_uvchr_msgs_helper(const U8 *s, STRLEN curlen, STRLEN *retlen, const U32 flags, U32 * errors, AV ** msgs);
 #define PERL_ARGS_ASSERT__UTF8N_TO_UVCHR_MSGS_HELPER   \
        assert(s)
@@ -4334,6 +4329,11 @@ PERL_CALLCONV UV Perl_utf8_to_uvchr(pTHX_ const U8 *s, STRLEN *retlen)
 PERL_CALLCONV UV       Perl_utf8_to_uvchr_buf(pTHX_ const U8 *s, const U8 *send, STRLEN *retlen);
 #define PERL_ARGS_ASSERT_UTF8_TO_UVCHR_BUF     \
        assert(s); assert(send)
+#ifndef PERL_NO_INLINE_FUNCTIONS
+PERL_STATIC_INLINE UV  Perl_utf8_to_uvchr_buf_helper(pTHX_ const U8 *s, const U8 *send, STRLEN *retlen);
+#define PERL_ARGS_ASSERT_UTF8_TO_UVCHR_BUF_HELPER      \
+       assert(s); assert(send)
+#endif
 #ifndef NO_MATHOMS
 PERL_CALLCONV UV       Perl_utf8_to_uvuni(pTHX_ const U8 *s, STRLEN *retlen)
                        __attribute__deprecated__;
diff --git a/utf8.c b/utf8.c
index 9f5f59e..0d88d52 100644 (file)
--- a/utf8.c
+++ b/utf8.c
@@ -2274,7 +2274,7 @@ Perl_utf8_to_uvchr_buf(pTHX_ const U8 *s, const U8 *send, STRLEN *retlen)
 {
     PERL_ARGS_ASSERT_UTF8_TO_UVCHR_BUF;
 
-    return _utf8_to_uvchr_buf(s, send, retlen);
+    return utf8_to_uvchr_buf_helper(s, send, retlen);
 }
 
 /* This is marked as deprecated
diff --git a/utf8.h b/utf8.h
index 61444d5..e6c7864 100644 (file)
--- a/utf8.h
+++ b/utf8.h
@@ -69,7 +69,7 @@ the string is invariant.
 #define uvchr_to_utf8_flags_msgs(d,uv,flags,msgs)                              \
                 uvoffuni_to_utf8_flags_msgs(d,NATIVE_TO_UNI(uv),flags, msgs)
 #define utf8_to_uvchr_buf(s, e, lenp)                                          \
-                   _utf8_to_uvchr_buf((const U8 *) (s), (const U8 *) e, lenp)
+            utf8_to_uvchr_buf_helper((const U8 *) (s), (const U8 *) e, lenp)
 #define utf8n_to_uvchr(s, len, lenp, flags)                                    \
                                 utf8n_to_uvchr_error(s, len, lenp, flags, 0)
 #define utf8n_to_uvchr_error(s, len, lenp, flags, errors)                      \