summaryrefslogtreecommitdiff
path: root/embed.fnc
diff options
context:
space:
mode:
authorKarl Williamson <khw@cpan.org>2016-10-10 21:18:37 -0600
committerKarl Williamson <khw@cpan.org>2016-10-13 11:18:12 -0600
commitf9380377ac81dfbd87f997094a742406eb899a15 (patch)
tree399236fb4d72c139a7c90e44fc309795ee41ad93 /embed.fnc
parent3757e55dd9611aede000f6f036237c4fda19b4f6 (diff)
downloadperl-f9380377ac81dfbd87f997094a742406eb899a15.tar.gz
Add utf8n_to_uvchr_error
This new function behaves like utf8n_to_uvchr(), but takes an extra parameter that points to a U32 which will be set to 0 if no errors are found; otherwise each error found will set a bit in it. This can be used by the caller to figure out precisely what the error(s) is/are. Previously, one would have to capture and parse the warning/error messages raised. This can be used, for example, to customize the messages to the expected end-user's knowledge level.
Diffstat (limited to 'embed.fnc')
-rw-r--r--embed.fnc10
1 files changed, 9 insertions, 1 deletions
diff --git a/embed.fnc b/embed.fnc
index 64a812bf03..46426b64c4 100644
--- a/embed.fnc
+++ b/embed.fnc
@@ -1737,7 +1737,15 @@ Amd |UV |utf8_to_uvchr_buf |NN const U8 *s|NN const U8 *send|NULLOK STRLEN *retl
ApdD |UV |utf8_to_uvuni_buf |NN const U8 *s|NN const U8 *send|NULLOK STRLEN *retlen
pM |bool |check_utf8_print |NN const U8 *s|const STRLEN len
-Adp |UV |utf8n_to_uvchr |NN const U8 *s|STRLEN curlen|NULLOK STRLEN *retlen|const U32 flags
+Adop |UV |utf8n_to_uvchr |NN const U8 *s \
+ |STRLEN curlen \
+ |NULLOK STRLEN *retlen \
+ |const U32 flags
+Adp |UV |utf8n_to_uvchr_error|NN const U8 *s \
+ |STRLEN curlen \
+ |NULLOK STRLEN *retlen \
+ |const U32 flags \
+ |NULLOK U32 * errors
AipnR |UV |valid_utf8_to_uvchr |NN const U8 *s|NULLOK STRLEN *retlen
Ap |UV |utf8n_to_uvuni|NN const U8 *s|STRLEN curlen|NULLOK STRLEN *retlen|U32 flags