summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndy Wingo <wingo@pobox.com>2011-10-26 00:42:17 +0200
committerAndy Wingo <wingo@pobox.com>2011-10-26 00:42:37 +0200
commit92e35e8daa4c46b08fabf84407ff8435033af87f (patch)
tree90dfe28f179e8ad79de9b0edd53608ad9545ea6f
parentd1d1c5dea556e993255fa1508fe87464567f64d4 (diff)
downloadguile-92e35e8daa4c46b08fabf84407ff8435033af87f.tar.gz
don't downcase characters before hashing them
* libguile/hash.c (hasher, scm_ihashv): Don't downcase characters before hashing them. That is silly.
-rw-r--r--libguile/hash.c8
1 files changed, 1 insertions, 7 deletions
diff --git a/libguile/hash.c b/libguile/hash.c
index 574156eaf..b94d721fc 100644
--- a/libguile/hash.c
+++ b/libguile/hash.c
@@ -252,9 +252,6 @@ scm_raw_ihashq (scm_t_bits key)
}
-/* Dirk:FIXME:: why downcase for characters? (2x: scm_hasher, scm_ihashv) */
-
-
static unsigned long
hasher (SCM obj, unsigned long n, size_t d)
{
@@ -264,7 +261,7 @@ hasher (SCM obj, unsigned long n, size_t d)
return SCM_I_INUM(obj) % n; /* SCM_INUMP(obj) */
case scm_tc3_imm24:
if (SCM_CHARP(obj))
- return (unsigned)(scm_c_downcase(SCM_CHAR(obj))) % n;
+ return ((unsigned)SCM_CHAR(obj)) % n;
switch (SCM_UNPACK (obj)) {
case SCM_EOL_BITS:
d = 256;
@@ -405,9 +402,6 @@ SCM_DEFINE (scm_hashq, "hashq", 2, 0, 0,
unsigned long
scm_ihashv (SCM obj, unsigned long n)
{
- if (SCM_CHARP(obj))
- return ((unsigned long) (scm_c_downcase (SCM_CHAR (obj)))) % n; /* downcase!?!! */
-
if (SCM_NUMP(obj))
return (unsigned long) hasher(obj, n, 10);
else