This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Fix embed.fnc for utf8_to_uvchr_buf
authorKarl Williamson <khw@cpan.org>
Thu, 26 Jan 2017 05:19:55 +0000 (22:19 -0700)
committerKarl Williamson <khw@cpan.org>
Thu, 26 Jan 2017 05:22:07 +0000 (22:22 -0700)
embed.fnc
proto.h
utf8.c

index 475d86a..1b05dd0 100644 (file)
--- a/embed.fnc
+++ b/embed.fnc
@@ -1799,7 +1799,7 @@ ApMd      |U8*    |bytes_to_utf8  |NN const U8 *s|NN STRLEN *len
 ApdD   |UV     |utf8_to_uvchr  |NN const U8 *s|NULLOK STRLEN *retlen
 ApdD   |UV     |utf8_to_uvuni  |NN const U8 *s|NULLOK STRLEN *retlen
 ApMD   |UV     |valid_utf8_to_uvuni    |NN const U8 *s|NULLOK STRLEN *retlen
-Amd    |UV     |utf8_to_uvchr_buf      |NN const U8 *s|NN const U8 *send|NULLOK STRLEN *retlen
+Aopd   |UV     |utf8_to_uvchr_buf      |NN const U8 *s|NN const U8 *send|NULLOK STRLEN *retlen
 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
 
diff --git a/proto.h b/proto.h
index 516888c..007bff7 100644 (file)
--- a/proto.h
+++ b/proto.h
@@ -3548,7 +3548,9 @@ PERL_CALLCONV UV  Perl_utf8_to_uvchr(pTHX_ const U8 *s, STRLEN *retlen)
 #define PERL_ARGS_ASSERT_UTF8_TO_UVCHR \
        assert(s)
 
-/* PERL_CALLCONV UV    utf8_to_uvchr_buf(pTHX_ const U8 *s, const U8 *send, STRLEN *retlen); */
+PERL_CALLCONV UV       Perl_utf8_to_uvchr_buf(pTHX_ const U8 *s, const U8 *send, STRLEN *retlen);
+#define PERL_ARGS_ASSERT_UTF8_TO_UVCHR_BUF     \
+       assert(s); assert(send)
 PERL_CALLCONV UV       Perl_utf8_to_uvuni(pTHX_ const U8 *s, STRLEN *retlen)
                        __attribute__deprecated__;
 #define PERL_ARGS_ASSERT_UTF8_TO_UVUNI \
diff --git a/utf8.c b/utf8.c
index 77e16f3..c523f32 100644 (file)
--- a/utf8.c
+++ b/utf8.c
@@ -1748,6 +1748,8 @@ Also implemented as a macro in utf8.h
 UV
 Perl_utf8_to_uvchr_buf(pTHX_ const U8 *s, const U8 *send, STRLEN *retlen)
 {
+    PERL_ARGS_ASSERT_UTF8_TO_UVCHR_BUF;
+
     assert(s < send);
 
     return utf8n_to_uvchr(s, send - s, retlen,