This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
utf8_to_uvchr_buf() make behavior match docs
authorKarl Williamson <khw@cpan.org>
Sat, 29 Jun 2019 05:57:31 +0000 (23:57 -0600)
committerKarl Williamson <khw@cpan.org>
Tue, 2 Jul 2019 01:38:00 +0000 (19:38 -0600)
commit82651abe60a8c1ca1f9eb6aae0202ecfd34bfecf
treec6d1ca001a6040c9e60c9a3260ce8323a2d99985
parent34b633732d69b4cd1ac2f7d38cbcb76fa2e2c7ca
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.
embed.fnc
embed.h
inline.h
proto.h
utf8.c
utf8.h