Re: [Sawfish] hash table and concat

[ Thread Index | Date Index | More lists.tuxfamily.org/sawfish Archives ]


Hi,

On Sun, 25 Sep 2011 23:17:57 +0200
wrote womble@xxxxxxxxx:

>Hi fuchur,
>
>your hash-table is defined with test 'eq, but strings
>are not 'eq, only 'equal
>
>(eq "foo" "foo")
>()
>
>(equal "foo" "foo")
>t
>
>Thus you need to say
>   (define test-cache (make-weak-table equal-hash equal))
>
>Note that you need both 'equal-hash' to generate the key,
>and 'equal' for comparison. 'eq-hash' uses the address of
>the object to generate the key, but two strings of the same
>contents nevertheless usually have different addresses in
>memory.
>
>Regards,
>womble.

I understand it now. Thank you very much.

-- 
Regards,
Fuchur

GPG Fingerprint: CA3B 8204 5B3E 6D48 6D53  C116 E5BC 70D5 B8D7 B2B0

Attachment: signature.asc
Description: PGP signature



Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/