Skip to content

Commit bc21a71

Browse files
committed
utf8.c case changing macros: Use utf8_to_uv_or_die()
Which is a single function call that replaces these several lines of code
1 parent 8fbaa65 commit bc21a71

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

utf8.c

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4351,11 +4351,7 @@ S_turkic_uc(pTHX_ const U8 * const p, const U8 * const e,
43514351
} \
43524352
} \
43534353
else { /* malformed UTF-8 or ord above 255 */ \
4354-
STRLEN len_result; \
4355-
result = utf8n_to_uvchr(p, e - p, &len_result, UTF8_CHECK_ONLY); \
4356-
if (len_result == (STRLEN) -1) { \
4357-
force_out_malformed_utf8_message_(p, e, 0, MALFORMED_UTF8_DIE ); \
4358-
}
4354+
result = utf8_to_uv_or_die(p, e, NULL); \
43594355

43604356
#define CASE_CHANGE_BODY_END(locale_flags, change_macro) \
43614357
result = change_macro(result, p, ustrp, lenp); \

0 commit comments

Comments
 (0)