This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Strip leading underscore _variant_byte_number()
authorKarl Williamson <khw@cpan.org>
Tue, 10 Sep 2019 17:51:40 +0000 (11:51 -0600)
committerKarl Williamson <khw@cpan.org>
Sun, 15 Sep 2019 16:39:56 +0000 (10:39 -0600)
Names with leading underscores are reserved for the C implementers.

embed.fnc
embed.h
inline.h
proto.h
regexec.c

index 1bf9e62..3285ca7 100644 (file)
--- a/embed.fnc
+++ b/embed.fnc
@@ -1004,7 +1004,7 @@ ATidRp    |bool   |is_utf8_invariant_string_loc|NN const U8* const s          \
                |STRLEN len                                                 \
                |NULLOK const U8 ** ep
 #ifndef EBCDIC
-CTiRp  |unsigned int|_variant_byte_number|PERL_UINTMAX_T word
+CTiRp  |unsigned int|variant_byte_number|PERL_UINTMAX_T word
 #endif
 #if defined(PERL_CORE) || defined(PERL_EXT)
 EiTRd  |Size_t |variant_under_utf8_count|NN const U8* const s              \
diff --git a/embed.h b/embed.h
index 4ce22a5..9eb9a70 100644 (file)
--- a/embed.h
+++ b/embed.h
 #define csighandler            Perl_csighandler
 #endif
 #if !defined(EBCDIC)
-#define _variant_byte_number   Perl__variant_byte_number
+#define variant_byte_number    Perl_variant_byte_number
 #endif
 #if !defined(HAS_STRLCAT)
 #define my_strlcat             Perl_my_strlcat
index a55f19f..7df5ecb 100644 (file)
--- a/inline.h
+++ b/inline.h
@@ -466,7 +466,7 @@ Perl_is_utf8_invariant_string_loc(const U8* const s, STRLEN len, const U8 ** ep)
 #  if   BYTEORDER == 0x1234 || BYTEORDER == 0x12345678    \
      || BYTEORDER == 0x4321 || BYTEORDER == 0x87654321
 
-                *ep = x + _variant_byte_number(* (PERL_UINTMAX_T *) x);
+                *ep = x + variant_byte_number(* (PERL_UINTMAX_T *) x);
                 assert(*ep >= s && *ep < send);
 
                 return FALSE;
@@ -504,7 +504,7 @@ Perl_is_utf8_invariant_string_loc(const U8* const s, STRLEN len, const U8 ** ep)
 #ifndef EBCDIC
 
 PERL_STATIC_INLINE unsigned int
-Perl__variant_byte_number(PERL_UINTMAX_T word)
+Perl_variant_byte_number(PERL_UINTMAX_T word)
 {
 
     /* This returns the position in a word (0..7) of the first variant byte in
diff --git a/proto.h b/proto.h
index 1f062e0..84f8a15 100644 (file)
--- a/proto.h
+++ b/proto.h
@@ -4565,9 +4565,9 @@ PERL_CALLCONV_NO_RET int  Perl_magic_regdatum_set(pTHX_ SV* sv, MAGIC* mg)
 #endif
 #if !defined(EBCDIC)
 #ifndef PERL_NO_INLINE_FUNCTIONS
-PERL_STATIC_INLINE unsigned int        Perl__variant_byte_number(PERL_UINTMAX_T word)
+PERL_STATIC_INLINE unsigned int        Perl_variant_byte_number(PERL_UINTMAX_T word)
                        __attribute__warn_unused_result__;
-#define PERL_ARGS_ASSERT__VARIANT_BYTE_NUMBER
+#define PERL_ARGS_ASSERT_VARIANT_BYTE_NUMBER
 #endif
 
 #endif
index 97ea458..a6e5f87 100644 (file)
--- a/regexec.c
+++ b/regexec.c
@@ -579,7 +579,7 @@ S_find_span_end(U8 * s, const U8 * send, const U8 span_byte)
             span_word |= span_word << 4;
 
             /* That reduces the problem to what this function solves */
-            return s + _variant_byte_number(span_word);
+            return s + variant_byte_number(span_word);
 
 #endif
 
@@ -657,7 +657,7 @@ S_find_next_masked(U8 * s, const U8 * send, const U8 byte, const U8 mask)
             masked &= PERL_VARIANTS_WORD_MASK;
 
             /* This reduces the problem to that solved by this function */
-            s += _variant_byte_number(masked);
+            s += variant_byte_number(masked);
             return s;
 
         } while (s + PERL_WORDSIZE <= send);
@@ -723,7 +723,7 @@ S_find_span_end_mask(U8 * s, const U8 * send, const U8 span_byte, const U8 mask)
             masked |= masked << 1;
             masked |= masked << 2;
             masked |= masked << 4;
-            return s + _variant_byte_number(masked);
+            return s + variant_byte_number(masked);
 
 #endif