@@ -121,14 +121,14 @@ S_new_msg_hv(pTHX_ const char * const message, /* The message text */
121
121
=for apidoc uvoffuni_to_utf8_flags
122
122
123
123
THIS 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 >>.
126
126
127
127
This function is like them, but the input is a strict Unicode
128
128
(as opposed to native) code point. Only in very rare circumstances should code
129
129
not be using the native code point.
130
130
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 >.
132
132
133
133
=cut
134
134
*/
@@ -155,9 +155,11 @@ const char super_cp_format[] = "Code point 0x%" UVXf " is not Unicode,"
155
155
#define MASK UTF_CONTINUATION_MASK
156
156
157
157
/*
158
- =for apidoc uvchr_to_utf8_flags_msgs
158
+ =for apidoc uv_to_utf8_msgs
159
+ =for apidoc_item uvchr_to_utf8_flags_msgs
159
160
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.
161
163
162
164
Most code should use C<L</uvchr_to_utf8_flags>()> rather than call this directly.
163
165
@@ -367,26 +369,32 @@ Perl_uvoffuni_to_utf8_flags_msgs(pTHX_ U8 *d, UV input_uv, UV flags, HV** msgs)
367
369
}
368
370
369
371
/*
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
371
375
=for apidoc_item uvchr_to_utf8_flags
372
376
373
377
These each add the UTF-8 representation of the native code point C<uv> to the
374
378
end of the string C<d>; C<d> should have at least C<UVCHR_SKIP(uv)+1> (up to
375
379
C<UTF8_MAXBYTES+1>) free bytes available. The return value is the pointer to
376
380
the byte after the end of the new character. In other words,
377
381
378
- d = uvchr_to_utf8 (d, uv);
382
+ d = uv_to_utf8 (d, uv);
379
383
380
384
This is the Unicode-aware way of saying
381
385
382
386
*(d++) = uv;
383
387
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>
386
392
with C<flags> set to 0, meaning no class of code point is considered
387
393
problematic. That means any input code point from 0..C<IV_MAX> is considered
388
394
to be fine. C<IV_MAX> is typically 0x7FFF_FFFF in a 32-bit word.
389
395
396
+ (C<uvchr_to_utf8_flags> is a synonym for C<uv_to_utf8_flags>).
397
+
390
398
A code point can be problematic in one of two ways. Its use could just raise a
391
399
warning, and/or it could be forbidden with the function failing, and returning
392
400
NULL.
0 commit comments