Duplicate :
|
|
Relates :
|
When defining a Dict you specify the compare and hash functions and Dict provides a couple useful default. In particular for pointers it provides this: // Slimey cheap key comparator. int32 cmpkey(const void *key1, const void *key2) { return (int32)((intptr_t)key1 - (intptr_t)key2); } Unforturnately in 64-bit mode this throws away the high 32 bits of the pointer.
|