# HG changeset patch # User Timo Sirainen # Date 1042234235 -7200 # Node ID fbd907ad9b27de1693f9c0ab4a05a96d12dd40b7 # Parent 4d6b69558add7d36e4e53a94616eeb88f0eb116f whops, shouldn't have been committed. diff -r 4d6b69558add -r fbd907ad9b27 src/lib/hash.c --- a/src/lib/hash.c Fri Jan 10 22:58:28 2003 +0200 +++ b/src/lib/hash.c Fri Jan 10 23:30:35 2003 +0200 @@ -88,8 +88,8 @@ } } -struct hash_table *hash_create(pool_t node_pool, pool_t table_pool, - unsigned int initial_size, HashFunc hash_func, +struct hash_table *hash_create(pool_t pool, unsigned int initial_size, + HashFunc hash_func, HashCompareFunc key_compare_func) { struct hash_table *table; @@ -97,8 +97,7 @@ i_assert(pool != NULL); table = p_new(pool, struct hash_table, 1); - table->node_pool = node_pool; - table->table_pool = table_pool; + table->pool = pool; table->size = CLAMP(primes_closest(initial_size), HASH_TABLE_MIN_SIZE, HASH_TABLE_MAX_SIZE); diff -r 4d6b69558add -r fbd907ad9b27 src/lib/hash.h --- a/src/lib/hash.h Fri Jan 10 22:58:28 2003 +0200 +++ b/src/lib/hash.h Fri Jan 10 23:30:35 2003 +0200 @@ -10,8 +10,8 @@ /* Create a new hash table. If initial_size is 0, the default value is used. If hash_func or key_compare_func is NULL, direct hashing/comparing is used. */ -struct hash_table *hash_create(pool_t node_pool, pool_t hash_pool, - unsigned int initial_size, HashFunc hash_func, +struct hash_table *hash_create(pool_t pool, unsigned int initial_size, + HashFunc hash_func, HashCompareFunc key_compare_func); void hash_destroy(struct hash_table *table);