mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-04-29 19:30:36 +02:00
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 and scm_i_str2uninterned_symbol internal hash type to unsigned long to explicitly match the scm_i_string_hash result type. * libguile/hash.c (scm_i_utf8_string_hash): Call u8_mbsnlen not u8_strnlen. * libguile/symbols.c (scm_i_str2symbol, scm_i_str2uninterned_symbol): Use unsigned long for scm_i_string_hash result. * test-suite/standalone/.gitignore: Add test-hashing. * test-suite/standalone/Makefile.am: Add test-hashing. * test-suite/standalone/test-hashing.c: Add.
16 lines
275 B
Text
16 lines
275 B
Text
/test-conversion
|
|
/test-gh
|
|
/test-hashing
|
|
/test-list
|
|
/test-num2integral
|
|
/test-round
|
|
/test-unwind
|
|
/test-with-guile-module
|
|
/test-use-srfi
|
|
/test-scm-with-guile
|
|
/test-scm-c-read
|
|
/test-fast-slot-ref
|
|
/test-scm-take-locale-symbol
|
|
/test-scm-take-u8vector
|
|
/test-loose-ends
|
|
/test-srfi-1
|