This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
perlapi: utf8_to_uvuni_buf() Add clarification
authorKarl Williamson <khw@cpan.org>
Sun, 4 Mar 2018 17:57:16 +0000 (10:57 -0700)
committerKarl Williamson <khw@cpan.org>
Sun, 4 Mar 2018 18:53:10 +0000 (11:53 -0700)
utf8.c

diff --git a/utf8.c b/utf8.c
index a30182a..eede51e 100644 (file)
--- a/utf8.c
+++ b/utf8.c
@@ -2329,7 +2329,9 @@ Perl_utf8_to_uvchr_buf(pTHX_ const U8 *s, const U8 *send, STRLEN *retlen)
 
 Only in very rare circumstances should code need to be dealing in Unicode
 (as opposed to native) code points.  In those few cases, use
-C<L<NATIVE_TO_UNI(utf8_to_uvchr_buf(...))|/utf8_to_uvchr_buf>> instead.
+C<L<NATIVE_TO_UNI(utf8_to_uvchr_buf(...))|/utf8_to_uvchr_buf>> instead.  If you
+are not absolutely sure this is one of those cases, then assume it isn't and
+use plain C<utf8_to_uvchr_buf> instead.
 
 Returns the Unicode (not-native) code point of the first character in the
 string C<s> which