Skip to content

Commit

Permalink
perlapi: Fix up to account for new utf8_to_uv functions
Browse files Browse the repository at this point in the history
  • Loading branch information
khwilliamson committed Mar 5, 2025
1 parent f3f0e7e commit 82a05dc
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion inline.h
Original file line number Diff line number Diff line change
Expand Up @@ -1299,7 +1299,7 @@ Perl_utf8_to_bytes_overwrite(pTHX_ U8 **s_ptr, STRLEN *lenp)

/*
=for apidoc valid_utf8_to_uvchr
Like C<L<perlapi/utf8_to_uvchr_buf>>, but should only be called when it is
Like C<L<perlapi/utf8_to_uv>>, but should only be called when it is
known that the next character in the input UTF-8 string C<s> is well-formed
(I<e.g.>, it passes C<L<perlapi/isUTF8_CHAR>>. Surrogates, non-character code
points, and non-Unicode code points are allowed.
Expand Down
8 changes: 4 additions & 4 deletions mathoms.c
Original file line number Diff line number Diff line change
Expand Up @@ -181,15 +181,15 @@ Perl_uvuni_to_utf8(pTHX_ U8 *d, UV uv)
=for apidoc_section $unicode
=for apidoc utf8n_to_uvuni
Instead use L<perlapi/utf8_to_uvchr_buf>, or rarely, L<perlapi/utf8n_to_uvchr>.
Instead use L<perlapi/utf8_to_uv>, or rarely, L<perlapi/utf8_to_uv_flags>.
This function was useful for code that wanted to handle both EBCDIC and
ASCII platforms with Unicode properties, but starting in Perl v5.20, the
distinctions between the platforms have mostly been made invisible to most
code, so this function is quite unlikely to be what you want. If you do need
this precise functionality, use instead
C<L<NATIVE_TO_UNI(utf8_to_uvchr_buf(...))|perlapi/utf8_to_uvchr_buf>>
or C<L<NATIVE_TO_UNI(utf8n_to_uvchr(...))|perlapi/utf8n_to_uvchr>>.
this precise functionality, use instead L<perlapi/C<utf8_to_uv>> or
L<perlapi/C<utf8_to_uv_flags>> to calculate the native code point, and then
convert to Unicode using L<perlapi/C<NATIVE_TO_UNI>>.
=cut
*/
Expand Down
4 changes: 2 additions & 2 deletions regcharclass.h

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion regen/regcharclass.pl
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ =head1 DESCRIPTION
These forms should not be used I<except> on small sets of mostly widely
separated code points; otherwise the code generated is inefficient. For these
cases, it is best to use the C<is_> forms, and then find the code point with
C<utf8_to_uvchr_buf>(). This program can fail with a "deep recursion"
L<perlapi/C<utf8_to_uv>>. This program can fail with a "deep recursion"
message on the worst of the inappropriate sets. Examine the generated macro
to see if it is acceptable.
Expand Down

0 comments on commit 82a05dc

Please sign in to comment.