From c45e1f57ece38138f6cff0e2d9eee6a96da28f63 Mon Sep 17 00:00:00 2001 From: Rob Browning Date: Wed, 11 Dec 2024 11:21:45 -0600 Subject: [PATCH] scm_i_utf8_string_hash: switch to u8_mbtouc libguile/hash.c (scm_i_utf8_string_hash): Switch from u8_mbtouc_unsafe to u8_mbtouc since the unsafe variant is now the same (see the info pages). --- libguile/hash.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/libguile/hash.c b/libguile/hash.c index a038a11bf..ba2a1207d 100644 --- a/libguile/hash.c +++ b/libguile/hash.c @@ -195,26 +195,26 @@ scm_i_utf8_string_hash (const char *str, size_t len) /* Handle most of the key. */ while (length > 3) { - ustr += u8_mbtouc_unsafe (&u32, ustr, end - ustr); + ustr += u8_mbtouc (&u32, ustr, end - ustr); a += u32; - ustr += u8_mbtouc_unsafe (&u32, ustr, end - ustr); + ustr += u8_mbtouc (&u32, ustr, end - ustr); b += u32; - ustr += u8_mbtouc_unsafe (&u32, ustr, end - ustr); + ustr += u8_mbtouc (&u32, ustr, end - ustr); c += u32; mix (a, b, c); length -= 3; } /* Handle the last 3 elements's. */ - ustr += u8_mbtouc_unsafe (&u32, ustr, end - ustr); + ustr += u8_mbtouc (&u32, ustr, end - ustr); a += u32; if (--length) { - ustr += u8_mbtouc_unsafe (&u32, ustr, end - ustr); + ustr += u8_mbtouc (&u32, ustr, end - ustr); b += u32; if (--length) { - ustr += u8_mbtouc_unsafe (&u32, ustr, end - ustr); + ustr += u8_mbtouc (&u32, ustr, end - ustr); c += u32; } }