This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Add is_utf8_fixed_width_buf_flags() and use it
authorKarl Williamson <khw@cpan.org>
Mon, 26 Sep 2016 04:04:08 +0000 (22:04 -0600)
committerKarl Williamson <khw@cpan.org>
Mon, 26 Sep 2016 04:24:20 +0000 (22:24 -0600)
commit8bc127bf58304a1e46a3e33d30b0b8b6f21abb07
treee19a856cb909b92fa7bd5a7c68dd1bc2fce270b0
parent9f2abfdef8903cce0a7b12ce12788ce7e9f72ed1
Add is_utf8_fixed_width_buf_flags() and use it

This encodes a simple pattern that may not be immediately obvious to
someone needing it.  If you have a fixed-size buffer that is full of
purportedly UTF-8 bytes, is it valid or not?  It's easy to do, as shown
in this commit.  The file test operators -T and -B can be simpified by
using this function.
embed.fnc
embed.h
ext/XS-APItest/APItest.xs
ext/XS-APItest/t/utf8.t
inline.h
pp_sys.c
proto.h