diff options
author | Karl Williamson <khw@cpan.org> | 2019-06-28 23:57:31 -0600 |
---|---|---|
committer | Karl Williamson <khw@cpan.org> | 2019-07-01 19:38:00 -0600 |
commit | 82651abe60a8c1ca1f9eb6aae0202ecfd34bfecf (patch) | |
tree | c6d1ca001a6040c9e60c9a3260ce8323a2d99985 /utf8.c | |
parent | 34b633732d69b4cd1ac2f7d38cbcb76fa2e2c7ca (diff) | |
download | perl-82651abe60a8c1ca1f9eb6aae0202ecfd34bfecf.tar.gz |
utf8_to_uvchr_buf() make behavior match docs
For well formed input, there is no change. But for malformed it wasn't
returning the documented length when warnings were enabled, and not
always the documented value when they were disabled.
This is implemented as an inline function, called from both the macro
and the Perl_ form.
Devel::PPPort has sufficient tests for this.
Diffstat (limited to 'utf8.c')
-rw-r--r-- | utf8.c | 5 |
1 files changed, 1 insertions, 4 deletions
@@ -2271,10 +2271,7 @@ 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, - ckWARN_d(WARN_UTF8) ? 0 : UTF8_ALLOW_ANY); + return _utf8_to_uvchr_buf(s, send, retlen); } /* This is marked as deprecated |