From d8a93acc1539bae8eaa9ae1ddb5a2bda88897848 Mon Sep 17 00:00:00 2001 From: Karl Williamson Date: Thu, 5 Dec 2024 11:35:32 -0700 Subject: [PATCH] regexec.c: Use preferred utf8_to_uv; not utf8_to_uvchr_buf This is in the function S_isFOO_utf8_lc() --- regexec.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/regexec.c b/regexec.c index 47073dc72041..fd72bd5724d1 100644 --- a/regexec.c +++ b/regexec.c @@ -608,6 +608,7 @@ S_isFOO_utf8_lc(pTHX_ const U8 classnum, const U8* character, const U8* e) } _CHECK_AND_OUTPUT_WIDE_LOCALE_UTF8_MSG(character, e); + UV cp; switch ((char_class_number_) classnum) { case CC_ENUM_SPACE_: return is_XPERLSPACE_high(character); @@ -615,8 +616,8 @@ S_isFOO_utf8_lc(pTHX_ const U8 classnum, const U8* character, const U8* e) case CC_ENUM_XDIGIT_: return is_XDIGIT_high(character); case CC_ENUM_VERTSPACE_: return is_VERTWS_high(character); default: - return _invlist_contains_cp(PL_XPosix_ptrs[classnum], - utf8_to_uvchr_buf(character, e, NULL)); + return utf8_to_uv(character, e, &cp, NULL) + && _invlist_contains_cp(PL_XPosix_ptrs[classnum], cp); } NOT_REACHED; /* NOTREACHED */ }