From 4375e297b19bc2177e17cc5616e75d96be053328 Mon Sep 17 00:00:00 2001 From: Stef Walter Date: Wed, 26 Jan 2011 12:46:14 -0600 Subject: Add testing and start testing hash table functionality. --- module/hash.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'module/hash.c') diff --git a/module/hash.c b/module/hash.c index 84d57a2..30efced 100644 --- a/module/hash.c +++ b/module/hash.c @@ -424,6 +424,21 @@ hash_ulongptr_equal (const void *ulong_one, const void *ulong_two) return *((unsigned long*)ulong_one) == *((unsigned long*)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) { -- cgit v1.2.3