@@ -121,14 +121,14 @@ S_new_msg_hv(pTHX_ const char * const message, /* The message text */
121121=for apidoc uvoffuni_to_utf8_flags
122122
123123THIS FUNCTION SHOULD BE USED IN ONLY VERY SPECIALIZED CIRCUMSTANCES.
124- Instead, B<Almost all code should use L<perlapi/uvchr_to_utf8 > or
125- L<perlapi/uvchr_to_utf8_flags >>.
124+ Instead, B<Almost all code should use L<perlapi/uv_to_utf8 > or
125+ L<perlapi/uv_to_utf8_flags >>.
126126
127127This function is like them, but the input is a strict Unicode
128128(as opposed to native) code point. Only in very rare circumstances should code
129129not be using the native code point.
130130
131- For details, see the description for L<perlapi/uvchr_to_utf8_flags >.
131+ For details, see the description for L<perlapi/uv_to_utf8_flags >.
132132
133133=cut
134134*/
@@ -155,9 +155,11 @@ const char super_cp_format[] = "Code point 0x%" UVXf " is not Unicode,"
155155#define MASK UTF_CONTINUATION_MASK
156156
157157/*
158- =for apidoc uvchr_to_utf8_flags_msgs
158+ =for apidoc uv_to_utf8_msgs
159+ =for apidoc_item uvchr_to_utf8_flags_msgs
159160
160- THIS FUNCTION SHOULD BE USED IN ONLY VERY SPECIALIZED CIRCUMSTANCES.
161+ These functions are identical. THEY SHOULD BE USED IN ONLY VERY SPECIALIZED
162+ CIRCUMSTANCES.
161163
162164Most code should use C<L</uvchr_to_utf8_flags>()> rather than call this directly.
163165
@@ -367,26 +369,32 @@ Perl_uvoffuni_to_utf8_flags_msgs(pTHX_ U8 *d, UV input_uv, UV flags, HV** msgs)
367369}
368370
369371/*
370- =for apidoc uvchr_to_utf8
372+ =for apidoc uv_to_utf8
373+ =for apidoc_item uv_to_utf8_flags
374+ =for apidoc_item uvchr_to_utf8
371375=for apidoc_item uvchr_to_utf8_flags
372376
373377These each add the UTF-8 representation of the native code point C<uv> to the
374378end of the string C<d>; C<d> should have at least C<UVCHR_SKIP(uv)+1> (up to
375379C<UTF8_MAXBYTES+1>) free bytes available. The return value is the pointer to
376380the byte after the end of the new character. In other words,
377381
378- d = uvchr_to_utf8 (d, uv);
382+ d = uv_to_utf8 (d, uv);
379383
380384This is the Unicode-aware way of saying
381385
382386 *(d++) = uv;
383387
384- C<flags> is used to make some classes of code points problematic in some way.
385- C<uvchr_to_utf8> is effectively the same as calling C<uvchr_to_utf8_flags>
388+ (C<uvchr_to_utf8> is a synonym for C<uv_to_utf8>.)
389+
390+ C<uv_to_utf8_flags> is used to make some classes of code points problematic in
391+ some way. C<uv_to_utf8> is effectively the same as calling C<uv_to_utf8_flags>
386392with C<flags> set to 0, meaning no class of code point is considered
387393problematic. That means any input code point from 0..C<IV_MAX> is considered
388394to be fine. C<IV_MAX> is typically 0x7FFF_FFFF in a 32-bit word.
389395
396+ (C<uvchr_to_utf8_flags> is a synonym for C<uv_to_utf8_flags>).
397+
390398A code point can be problematic in one of two ways. Its use could just raise a
391399warning, and/or it could be forbidden with the function failing, and returning
392400NULL.
0 commit comments