From 22f363ffd253b5142b1138438c30f34da9494d4a Mon Sep 17 00:00:00 2001 From: Karl Williamson Date: Fri, 25 Jun 2021 13:09:08 -0600 Subject: Make macro isUTF8_CHAR_flags an inline fcn This makes it use the fast DFA for this functionality. --- utf8.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'utf8.c') diff --git a/utf8.c b/utf8.c index c78ce84ab5..7f26c8645c 100644 --- a/utf8.c +++ b/utf8.c @@ -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))) { -- cgit v1.2.1