[plt-scheme] Pointers and hashing

From: Thomas Chust (chust at web.de)
Date: Sat Jan 16 10:15:45 EST 2010

Matthew Flatt wrote:
> At Sat, 16 Jan 2010 01:10:26 +0100, Thomas Chust wrote:
>> [...]
>> Is there any sane way to compute such a hash code or do I really have to
>> write the pointer into some memory cell, read it back as an integer and
>> work with that value? It feels so C, I don't want to do that ;-)
> 
> I don't have any better idea, but I note that the `cast' function from
> `scheme/foreign' will do the memory-cell read and write for you.
> 

Thanks, I'll use (equal-hash-code (cast ... _pointer _long)) then.

Ciao,
Thomas


-- 
When C++ is your hammer, every problem looks like your thumb.


Posted on the users mailing list.