From c768db2b154dc6c67e212a2b19ed0e89687628fb Mon Sep 17 00:00:00 2001 From: Karl Williamson Date: Wed, 18 Dec 2024 14:43:44 -0700 Subject: [PATCH] utf8.c case changing macros: Use utf8_to_uv_or_die() Which is a single function call that replaces these several lines of code --- utf8.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/utf8.c b/utf8.c index de2149fc70ad..528d507a03b9 100644 --- a/utf8.c +++ b/utf8.c @@ -4351,11 +4351,7 @@ S_turkic_uc(pTHX_ const U8 * const p, const U8 * const e, } \ } \ else { /* malformed UTF-8 or ord above 255 */ \ - STRLEN len_result; \ - result = utf8n_to_uvchr(p, e - p, &len_result, UTF8_CHECK_ONLY); \ - if (len_result == (STRLEN) -1) { \ - force_out_malformed_utf8_message_(p, e, 0, MALFORMED_UTF8_DIE ); \ - } + result = utf8_to_uv_or_die(p, e, NULL); \ #define CASE_CHANGE_BODY_END(locale_flags, change_macro) \ result = change_macro(result, p, ustrp, lenp); \