From da3621c1804e6da9cefd712da9d0dd48fff61add Mon Sep 17 00:00:00 2001 From: matthijs Date: Thu, 7 Apr 2005 19:19:16 +0000 Subject: (svn r2165) - Codechange: [NPF] Properly enummed NPF hash size, it is easily changable now. - Codechange: [NPF] Improved the NPF hash calculation slightly. - Codechange: [NPF] Increased hash size, should speed up somewhat. --- queue.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'queue.h') diff --git a/queue.h b/queue.h index 56ecd2a3e..c4a1bf0ee 100644 --- a/queue.h +++ b/queue.h @@ -4,6 +4,7 @@ //#define NOFREE //#define QUEUE_DEBUG //#define HASH_DEBUG +//#define HASH_STATS typedef struct Queue Queue; @@ -142,7 +143,8 @@ struct HashNode { void* value; HashNode* next; }; -/* Generates a hash code from the given key pair. You should make sure that +/** + * Generates a hash code from the given key pair. You should make sure that * the resulting range is clearly defined. */ typedef uint Hash_HashProc(uint key1, uint key2); @@ -184,7 +186,7 @@ void* Hash_Get(Hash* h, uint key1, uint key2); Hash* new_Hash(Hash_HashProc* hash, int num_buckets); /* Builds a new hash in an existing struct. Make sure that hash() always * returns a hash less than num_buckets! Call delete_hash after use */ -void init_Hash(Hash* h, Hash_HashProc* hash, int num_buckets); +void init_Hash(Hash* h, Hash_HashProc* hash, uint num_buckets); /* * Deletes the hash and cleans up. Only cleans up memory allocated by new_Hash * & friends. If free is true, it will call free() on all the values that -- cgit v1.2.3-70-g09d2