This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Make bytes_from_utf8_loc() internal
authorKarl Williamson <khw@cpan.org>
Sat, 29 Aug 2020 19:45:48 +0000 (13:45 -0600)
committerKarl Williamson <khw@cpan.org>
Fri, 4 Sep 2020 22:55:31 +0000 (16:55 -0600)
And add it to perlintern, and fix grammar in its pod

embed.fnc
utf8.c

index 37bb122..07788b1 100644 (file)
--- a/embed.fnc
+++ b/embed.fnc
@@ -2514,7 +2514,7 @@ Apxd      |U8*    |utf8_to_bytes  |NN U8 *s|NN STRLEN *lenp
 Apd    |int    |bytes_cmp_utf8 |NN const U8 *b|STRLEN blen|NN const U8 *u \
                                |STRLEN ulen
 AMxdp  |U8*    |bytes_from_utf8|NN const U8 *s|NN STRLEN *lenp|NN bool *is_utf8p
-AxTp   |U8*    |bytes_from_utf8_loc|NN const U8 *s                         \
+CxTdp  |U8*    |bytes_from_utf8_loc|NN const U8 *s                         \
                                    |NN STRLEN *lenp                        \
                                    |NN bool *is_utf8p                      \
                                    |NULLOK const U8 ** first_unconverted
diff --git a/utf8.c b/utf8.c
index d0b9596..718d9e8 100644 (file)
--- a/utf8.c
+++ b/utf8.c
@@ -2541,11 +2541,6 @@ Perl_bytes_from_utf8(pTHX_ const U8 *s, STRLEN *lenp, bool *is_utf8p)
 }
 
 /*
-=for comment
-skip apidoc
-This is not currently externally documented because we don't want people to use
-it for now.  XXX Perhaps that is too paranoid, and it should be documented?
-
 =for apidoc bytes_from_utf8_loc
 
 Like C<L</bytes_from_utf8>()>, but takes an extra parameter, a pointer to where
@@ -2564,7 +2559,7 @@ C<"s">.  C<*lenp> is set to its length, not including the terminating C<NUL>.
 If the entire input string was converted, C<*is_utf8p> is set to a FALSE value,
 and C<*first_non_downgradable> is set to C<NULL>.
 
-Otherwise, C<*first_non_downgradable> set to point to the first byte of the
+Otherwise, C<*first_non_downgradable> is set to point to the first byte of the
 first character in the original string that wasn't converted.  C<*is_utf8p> is
 unchanged.  Note that the new string may have length 0.