Re: [Sawfish] hash table and concat |
[ Thread Index |
Date Index
| More lists.tuxfamily.org/sawfish Archives
]
- To: <sawfish@xxxxxxxxxxxxxxxxxxx>
- Subject: Re: [Sawfish] hash table and concat
- From: fuchur <flohtransporter@xxxxxxxxx>
- Date: Sun, 25 Sep 2011 23:49:51 +0200
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=date:from:to:subject:message-id:in-reply-to:references:organization :face:x-face:mime-version:content-type:x-mailscanner-spamcheck; bh=CltUvAUxFjR/vV8/8IEqXWppOkK44qbtxKtdr7YsZe8=; b=rHpkZTYou9fzdYUMY6++eute642teqHrBwSB2f/hjINtB6TTlfHWzOSr2fZT8Fo3Gw grNpJtZaHM9AxhjMFHUBl3eKjFkZ5MhcnF6LgqMRKcGiw7+sAbvvmW5sWtPnFK1XOK9E FCRvx4ykoeWvAs1qu4SDGinmMQdmAAlvvstPI=
- Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAAFVBMVEXo6dXi2qlaWEv9/+78//DLrYv889H/lWcuAAACA0lEQVQ4ja2TQW7jMAxF5RbxWmwhrRMB3jtQ6gskBzAVMGupQXT/I8ynZU+n08xuGDhG8vSpL5IycYszPkucLvpt4ik+DQVPkWmvywYv5z8Uz1NNHdFrjCP5bJqHFYxOhMgRUSHawEkVImyJyfhaa59/a0yEwjom/b9Wsl+uAOYvQO+TMRsILL4o8JU6zmS7BYgEYVJFUQPOZ3JzA0nYU1WAVGJ3WNcAfFHfQHXCKbCzK0jhpjv7Whzhh5A7bSD0tfgsDBDCQNwU/BkgKRVcHFYNNKMkAHMXllwAg6hCoDhCbuvLIZuc31SBB0sb8FO8d2TMMQy1SwMnhqsPZPX3uFY/54It35hmIywKRlrANOlJnJAYPApyX02vxZuSWmYxTkGN9xhrVVDSoGutcSg7yMdtcvcMy106ALA1cAF39WU/pUPuUV24JXk1Zsc7djzJDV6LJYdKOfKo7s4fxc3I8WDvyOm5Hb/rlET00KLqpVZWgVbl2iZxJ1vHtSCIYW7ggQ6uAF3ady4JwPmkYPkfhx5SeEd5VvCxgrJsjaNOa6rjBrQXVz0+NTAqKAowBxjcc3Tr/YAtSpgtgNezgh0AXnHU5AFFG7gN7tgUp2hDi+t2TzfQ04N1buLfYCzFE1n5cTnHPldTH9fvQHe3aN8x3X9eZ6eG9/EnWObx28028R/xH8EvDGr5+fmwfm8AAAAASUVORK5CYII=
- Organization: W.W
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