diff options
Diffstat (limited to 'module/hash.c')
-rw-r--r-- | module/hash.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/module/hash.c b/module/hash.c index 84d57a2..30efced 100644 --- a/module/hash.c +++ b/module/hash.c @@ -425,6 +425,21 @@ hash_ulongptr_equal (const void *ulong_one, const void *ulong_two) } unsigned int +hash_intptr_hash (const void *to_int) +{ + assert (to_int); + return (unsigned int)*((unsigned long*)to_int); +} + +int +hash_intptr_equal (const void *int_one, const void *int_two) +{ + assert (int_one); + assert (int_two); + return *((unsigned long*)int_one) == *((unsigned long*)int_two); +} + +unsigned int hash_direct_hash (const void *ptr) { return (unsigned int)ptr; |