Skip to content

Commit a6d110f

Browse files
committed
check_utf8_print: Use utf8_to_uv_flags.
This replaces the old-style utf8n_to_uvchr()
1 parent c2ae512 commit a6d110f

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

utf8.c

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4687,8 +4687,10 @@ Perl_check_utf8_print(pTHX_ const U8* s, const STRLEN len)
46874687
if ( ckWARN_d(WARN_NON_UNICODE)
46884688
|| UNLIKELY(does_utf8_overflow(s, s + len) >= ALMOST_CERTAINLY_OVERFLOWS))
46894689
{
4690+
UV dummy;
4691+
46904692
/* A side effect of this function will be to warn */
4691-
(void) utf8n_to_uvchr(s, e - s, NULL, UTF8_WARN_SUPER);
4693+
(void) utf8_to_uv_flags(s, e, &dummy, NULL, UTF8_WARN_SUPER);
46924694
ok = FALSE;
46934695
}
46944696
}
@@ -4707,8 +4709,10 @@ Perl_check_utf8_print(pTHX_ const U8* s, const STRLEN len)
47074709
else if ( UNLIKELY(UTF8_IS_NONCHAR(s, e))
47084710
&& (ckWARN_d(WARN_NONCHAR)))
47094711
{
4712+
UV dummy;
4713+
47104714
/* A side effect of this function will be to warn */
4711-
(void) utf8n_to_uvchr(s, e - s, NULL, UTF8_WARN_NONCHAR);
4715+
(void) utf8_to_uv_flags(s, e, &dummy, NULL, UTF8_WARN_NONCHAR);
47124716
ok = FALSE;
47134717
}
47144718
}

0 commit comments

Comments
 (0)