mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-06-10 14:00:21 +02:00
(scm_hasher): Use SCM_UNPACK in the case labels so that
non-pointers are being compared. Thanks to Alexander Klimov!
This commit is contained in:
parent
bef38a17c4
commit
f228362b10
1 changed files with 4 additions and 4 deletions
|
@ -98,17 +98,17 @@ scm_hasher(SCM obj, unsigned long n, size_t d)
|
|||
return (unsigned)(scm_downcase(SCM_CHAR(obj))) % n;
|
||||
switch (SCM_UNPACK (obj)) {
|
||||
#ifndef SICP
|
||||
case SCM_EOL:
|
||||
case SCM_UNPACK(SCM_EOL):
|
||||
d = 256;
|
||||
break;
|
||||
#endif
|
||||
case SCM_BOOL_T:
|
||||
case SCM_UNPACK(SCM_BOOL_T):
|
||||
d = 257;
|
||||
break;
|
||||
case SCM_BOOL_F:
|
||||
case SCM_UNPACK(SCM_BOOL_F):
|
||||
d = 258;
|
||||
break;
|
||||
case SCM_EOF_VAL:
|
||||
case SCM_UNPACK(SCM_EOF_VAL):
|
||||
d = 259;
|
||||
break;
|
||||
default:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue