Re: (make-hash-table equal?) is broken (in 2.2)?
> "Michael A. Patton" writes
> I have a need for a hash table with equal? as the comparison operator
> (the keys are lists of symbols), but hash-table-get doesn't seem to
> work (even if I try to lookup a key that is eq?). It seems to work OK
> if the keys are a single symbol. Attached is a short transcript
> showing the problem. I don't have a chance right now to delve into
> the hash-table code, but if anyone has a hint (or a fix :-), I'd
> appreciate it... I did verify that hash-table-hash does return the
> same value for different, but equal? lists (although this isn't
> evident below...)
>
OOPS This is a bug which occurs when the result of hash-table-hash is a bignum
(equal? on some lists works...).
A simple fix consists to replace the line
z->storage_as.subr0.f = (SCM (*)()) hash_table_hash;
by
z->storage_as.subr0.f = (SCM (*)()) sxhash;
in the function "the_func".
-- Erick
Received on Thu Oct 19 1995 - 19:29:55 CET
This archive was generated by hypermail 2.3.0
: Mon Jul 21 2014 - 19:38:59 CEST