[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#56413: [PATCH 1/1] scm_i_utf8_string_hash: compute u8 chars not byte

From: Rob Browning
Subject: bug#56413: [PATCH 1/1] scm_i_utf8_string_hash: compute u8 chars not bytes
Date: Tue, 05 Jul 2022 22:04:08 -0500

Rob Browning <rlb@defaultvalue.org> writes:

> Noticed while investigating a migration to utf-8 strings.  After making
> changes that routed non-ascii symbol hashing through this function,
> encoding-iso88597.test began intermittently failing because it would
> traverse trailing garbage when u8_strnlen reported 8 chars instead of 4.
> Change the scm_i_str2symbol internal hash type to unsigned long to
> explicitly match the hashing result type.

Hmm.  I suppose the current test could be handled on the scheme side
instead.  (I'd started off attempting some more direct, elaborate tests
that didn't pan out.)  Happy to rework that if desired.

Rob Browning
rlb @defaultvalue.org and @debian.org
GPG as of 2011-07-10 E6A9 DA3C C9FD 1FF8 C676 D2C4 C0F0 39E9 ED1B 597A
GPG as of 2002-11-03 14DD 432F AE39 534D B592 F9A0 25C8 D377 8C7E 73A4

reply via email to

[Prev in Thread] Current Thread [Next in Thread]