diff options
author | Karl Williamson <khw@cpan.org> | 2021-06-25 13:09:08 -0600 |
---|---|---|
committer | Karl Williamson <khw@cpan.org> | 2021-08-14 06:47:43 -0600 |
commit | 22f363ffd253b5142b1138438c30f34da9494d4a (patch) | |
tree | a02ca691b6818aafce1300ab4cdd3706ff7c4087 /utf8.c | |
parent | 22afef87083fc7ad1b066588f5c20637fd387805 (diff) | |
download | perl-22f363ffd253b5142b1138438c30f34da9494d4a.tar.gz |
Make macro isUTF8_CHAR_flags an inline fcn
This makes it use the fast DFA for this functionality.
Diffstat (limited to 'utf8.c')
-rw-r--r-- | utf8.c | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -817,7 +817,10 @@ Perl_is_utf8_char_helper(const U8 * const s, const U8 * e, const U32 flags) assert(0 == (flags & ~(UTF8_DISALLOW_ILLEGAL_INTERCHANGE |UTF8_DISALLOW_PERL_EXTENDED))); - assert(! UTF8_IS_INVARIANT(*s)); + + if (UTF8_IS_INVARIANT(*s)) { + return 1; + } /* A variant char must begin with a start byte */ if (UNLIKELY(! UTF8_IS_START(*s))) { |