Skip to content

Commit 6301a3e

Browse files
committed
Revert "utf8n_to_uvuni: Use utf8_to_uv()"
This reverts commit d62b9fa. That commit turns out to be ill advised. I forgot that the function call it replaced also calls utf8_to_uv() and then munges its return value. This commit to succeed would have needed the same munging. But rather than repeat that logic, just call the original function, by simply reverting this commit. This fixes #23053. I haven't tested them, but it likely also takes care of #22820, #23086, and #22977
1 parent e9ffbac commit 6301a3e

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

mathoms.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -199,9 +199,7 @@ Perl_utf8n_to_uvuni(pTHX_ const U8 *s, STRLEN curlen, STRLEN *retlen, U32 flags)
199199
{
200200
PERL_ARGS_ASSERT_UTF8N_TO_UVUNI;
201201

202-
UV cp;
203-
(void) utf8_to_uv_flags(s, s + curlen, &cp, retlen, flags);
204-
return NATIVE_TO_UNI(cp);
202+
return NATIVE_TO_UNI(utf8n_to_uvchr(s, curlen, retlen, flags));
205203
}
206204

207205
UV

0 commit comments

Comments
 (0)