Skip to content

Commit 3af31f1

Browse files
committed
check_utf8_print: Use utf8_to_uv_flags.
This replaces the old-style utf8n_to_uvchr()
1 parent 7b3314d commit 3af31f1

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
@@ -4719,8 +4719,10 @@ Perl_check_utf8_print(pTHX_ const U8* s, const STRLEN len)
47194719
if ( ckWARN_d(WARN_NON_UNICODE)
47204720
|| UNLIKELY(does_utf8_overflow(s, s + len) >= ALMOST_CERTAINLY_OVERFLOWS))
47214721
{
4722+
UV dummy;
4723+
47224724
/* A side effect of this function will be to warn */
4723-
(void) utf8n_to_uvchr(s, e - s, NULL, UTF8_WARN_SUPER);
4725+
(void) utf8_to_uv_flags(s, e, &dummy, NULL, UTF8_WARN_SUPER);
47244726
ok = FALSE;
47254727
}
47264728
}
@@ -4739,8 +4741,10 @@ Perl_check_utf8_print(pTHX_ const U8* s, const STRLEN len)
47394741
else if ( UNLIKELY(UTF8_IS_NONCHAR(s, e))
47404742
&& (ckWARN_d(WARN_NONCHAR)))
47414743
{
4744+
UV dummy;
4745+
47424746
/* A side effect of this function will be to warn */
4743-
(void) utf8n_to_uvchr(s, e - s, NULL, UTF8_WARN_NONCHAR);
4747+
(void) utf8_to_uv_flags(s, e, &dummy, NULL, UTF8_WARN_NONCHAR);
47444748
ok = FALSE;
47454749
}
47464750
}

0 commit comments

Comments
 (0)