1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-06-12 06:41:13 +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:
Marius Vollmer 2001-06-04 22:16:43 +00:00
parent bef38a17c4
commit f228362b10

View file

@ -98,17 +98,17 @@ scm_hasher(SCM obj, unsigned long n, size_t d)
return (unsigned)(scm_downcase(SCM_CHAR(obj))) % n; return (unsigned)(scm_downcase(SCM_CHAR(obj))) % n;
switch (SCM_UNPACK (obj)) { switch (SCM_UNPACK (obj)) {
#ifndef SICP #ifndef SICP
case SCM_EOL: case SCM_UNPACK(SCM_EOL):
d = 256; d = 256;
break; break;
#endif #endif
case SCM_BOOL_T: case SCM_UNPACK(SCM_BOOL_T):
d = 257; d = 257;
break; break;
case SCM_BOOL_F: case SCM_UNPACK(SCM_BOOL_F):
d = 258; d = 258;
break; break;
case SCM_EOF_VAL: case SCM_UNPACK(SCM_EOF_VAL):
d = 259; d = 259;
break; break;
default: default: