quick fix to improve "hashing" of pointers (discard 4 least significant bits)
This commit is contained in:
parent
66b0ed7bf1
commit
2943cfdfdd
1 changed files with 1 additions and 1 deletions
|
|
@ -241,5 +241,5 @@ bool h_eq_ptr(const void *p, const void *q) {
|
||||||
}
|
}
|
||||||
|
|
||||||
HHashValue h_hash_ptr(const void *p) {
|
HHashValue h_hash_ptr(const void *p) {
|
||||||
return (uintptr_t)p;
|
return (uintptr_t)p >> 4;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue