This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
pp_sys.c: Simplify uses of sv_len_utf8
authorFather Chrysostomos <sprout@cpan.org>
Mon, 1 Oct 2012 13:28:48 +0000 (06:28 -0700)
committerFather Chrysostomos <sprout@cpan.org>
Mon, 1 Oct 2012 19:51:58 +0000 (12:51 -0700)
commit3f9147780a321aebc1c528741373d5c9f9d5c54b
tree5ef7149b3d2d7a52bcabea5ed92d1e45582061bc
parent48a5da33bd0f1ec8d1516f90d3bdf25b24acda6e
pp_sys.c: Simplify uses of sv_len_utf8

sv_len_utf8 is now careful not to record caches on magical or over-
loaded scalars (any non-PV, in fact).  It also returns the number of logical characters correctly, regardless of whether its input is utf8.
So we can take advantage of that to simplify pp_sysread.

For pp_syswrite, we can use sv_or_pv_len_utf8 with the existing
string buffer.
pp_sys.c