Skip to content

Commit

Permalink
utf8.c case changing macros: Use utf8_to_uv_or_die()
Browse files Browse the repository at this point in the history
Which is a single function call that replaces these several lines of
code
  • Loading branch information
khwilliamson committed Dec 18, 2024
1 parent 7496ff1 commit c768db2
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions utf8.c
Original file line number Diff line number Diff line change
Expand Up @@ -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); \
Expand Down

0 comments on commit c768db2

Please sign in to comment.