mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-06-29 14:30:34 +02:00
* symbols.c (scm_strhash): scm_downcase is now a function, not an
array; use it appropriately. Since GCC is quite happy to subscript functions, it never warned us about this; we should use -Wpointer-arith in the future. I guess we never tested case-insensitivity.
This commit is contained in:
parent
866679103b
commit
566011b96d
1 changed files with 2 additions and 2 deletions
|
@ -76,7 +76,7 @@ scm_strhash (str, len, n)
|
|||
scm_sizet i = 5;
|
||||
unsigned long h = 264 % n;
|
||||
while (i--)
|
||||
h = ((h << 8) + ((unsigned) (scm_downcase[str[h % len]]))) % n;
|
||||
h = ((h << 8) + ((unsigned) (scm_downcase (str[h % len])))) % n;
|
||||
return h;
|
||||
}
|
||||
else
|
||||
|
@ -84,7 +84,7 @@ scm_strhash (str, len, n)
|
|||
scm_sizet i = len;
|
||||
unsigned long h = 0;
|
||||
while (i)
|
||||
h = ((h << 8) + ((unsigned) (scm_downcase[str[--i]]))) % n;
|
||||
h = ((h << 8) + ((unsigned) (scm_downcase (str[--i])))) % n;
|
||||
return h;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue