[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Guile-commits] 01/02: scm_i_utf8_string_hash: switch to u8_mbtouc
From: |
Rob Browning |
Subject: |
[Guile-commits] 01/02: scm_i_utf8_string_hash: switch to u8_mbtouc |
Date: |
Wed, 11 Dec 2024 12:49:53 -0500 (EST) |
rlb pushed a commit to branch main
in repository guile.
commit c45e1f57ece38138f6cff0e2d9eee6a96da28f63
Author: Rob Browning <rlb@defaultvalue.org>
AuthorDate: Wed Dec 11 11:21:45 2024 -0600
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;
}
}