It doesn’t hash the value at the pointer; it hashes the pointer itself, in a platform- (size-) independant way.
Mine looks like this:
static inline unsigned long hash_ptr(const void *ptr, unsigned int bits)
{
return hash_long((unsigned long)ptr, bits);
}