summaryrefslogtreecommitdiff
path: root/mathoms.c
diff options
context:
space:
mode:
authorKarl Williamson <khw@cpan.org>2019-11-03 10:23:05 -0700
committerKarl Williamson <khw@cpan.org>2019-11-03 13:08:23 -0700
commit00e5307810a49f3c9c1ddf00034cc97c7544681a (patch)
treeffbaffb5453f95a980198f3ad36313dfda403332 /mathoms.c
parent663043704fc485479f3fc1f0f2bd994b4672a7b4 (diff)
downloadperl-00e5307810a49f3c9c1ddf00034cc97c7544681a.tar.gz
mathoms.c,utf8.c: Update to use UTF8_CHK_SKIP
This new macro expands to what these did. Update to use the common code.
Diffstat (limited to 'mathoms.c')
-rw-r--r--mathoms.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/mathoms.c b/mathoms.c
index b34012069f..b0122f95ca 100644
--- a/mathoms.c
+++ b/mathoms.c
@@ -1196,8 +1196,9 @@ Perl_is_utf8_char(const U8 *s)
PERL_ARGS_ASSERT_IS_UTF8_CHAR;
/* Assumes we have enough space, which is why this is deprecated. But the
- * strnlen() makes it safe for the common case of NUL-terminated strings */
- return isUTF8_CHAR(s, s + my_strnlen((char *) s, UTF8SKIP(s)));
+ * UTF8_CHK_SKIP(s)) makes it safe for the common case of NUL-terminated
+ * strings */
+ return isUTF8_CHAR(s, s + UTF8_CHK_SKIP(s));
}
/*