Skip to content

Commit db82b92

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 Perl#23053. I haven't tested them, but it likely also takes care of Perl#22820, Perl#23086, and Perl#22977
1 parent a9ad65a commit db82b92

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

mathoms.c

+1-3
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)