@@ -150,17 +150,17 @@ const char super_cp_format[] = "Code point 0x%" UVXf " is not Unicode,"
150
150
These functions are identical. THEY SHOULD BE USED IN ONLY VERY SPECIALIZED
151
151
CIRCUMSTANCES.
152
152
153
- Most code should use C<L</uvchr_to_utf8_flags >()> rather than call this directly.
153
+ Most code should use C<L</uv_to_utf8_flags >()> rather than call this directly.
154
154
155
155
This function is for code that wants any warning and/or error messages to be
156
- returned to the caller rather than be displayed. All messages that would have
157
- been displayed if all lexical warnings are enabled will be returned.
156
+ returned to the caller rather than be displayed. Any message that would have
157
+ been displayed if all lexical warnings are enabled will instead be returned.
158
158
159
159
It is just like C<L</uvchr_to_utf8_flags>> but it takes an extra parameter
160
160
placed after all the others, C<msgs>. If this parameter is 0, this function
161
161
behaves identically to C<L</uvchr_to_utf8_flags>>. Otherwise, C<msgs> should
162
162
be a pointer to an C<HV *> variable, in which this function creates a new HV to
163
- contain any appropriate messages . The hash has three key-value pairs, as
163
+ contain any appropriate message . The hash has three key-value pairs, as
164
164
follows:
165
165
166
166
=over 4
@@ -173,26 +173,44 @@ The text of the message as a C<SVpv>.
173
173
174
174
The warning category (or categories) packed into a C<SVuv>.
175
175
176
- =item C<flag >
176
+ =item C<flag_bit >
177
177
178
178
A single flag bit associated with this message, in a C<SVuv>.
179
- The bit corresponds to some bit in the C<*errors> return value,
180
- such as C<UNICODE_GOT_SURROGATE>.
179
+ The bit corresponds to some bit in the C<*errors> return value.
180
+ The possibilities are:
181
+
182
+ =over
183
+
184
+ =item C<UNICODE_GOT_SURROGATE>
185
+
186
+ =item C<UNICODE_GOT_NONCHAR>
187
+
188
+ =item C<UNICODE_GOT_SUPER>
189
+
190
+ =item C<UNICODE_GOT_PERL_EXTENDED>
191
+
192
+ =back
181
193
182
194
=back
183
195
184
196
It's important to note that specifying this parameter as non-null will cause
185
- any warnings this function would otherwise generate to be suppressed, and
197
+ any warning this function would otherwise generate to be suppressed, and
186
198
instead be placed in C<*msgs>. The caller can check the lexical warnings state
187
- (or not) when choosing what to do with the returned messages.
199
+ (or not) when choosing what to do with the returned message.
200
+
201
+ Only a single message is returned; if a code point requires Perl extended UTF-8
202
+ to represent, it is also above-Unicode. If either the
203
+ C<UNICODE_WARN_PERL_EXTENDED> or C<UNICODE_DISALLOW_PERL_EXTENDED> flags are
204
+ set, the return is controlled by them; if neither is set, the return is
205
+ controlled by the C<UNICODE_WARN_SUPER> and C<UNICODE_DISALLOW_SUPER> flags.
188
206
189
207
The caller, of course, is responsible for freeing any returned HV.
190
208
191
209
=cut
192
210
*/
193
211
194
212
/* Undocumented; we don't want people using this. Instead they should use
195
- * uvchr_to_utf8_flags_msgs () */
213
+ * uv_to_utf8_msgs () */
196
214
U8 *
197
215
Perl_uvoffuni_to_utf8_flags_msgs (pTHX_ U8 * d , UV input_uv , UV flags , HV * * msgs )
198
216
{
0 commit comments