* Added hash_count_elements() and hash_count_used_slots() (mainly for
diagnostic purposes). * hash_init() adjusts the table size to a prime number, which should result in a better element distribution, particularly since usually a power of two is passed. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22210 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -38,6 +38,8 @@ struct hash_iterator *hash_open(struct hash_table *table, struct hash_iterator *
|
||||
void hash_close(struct hash_table *table, struct hash_iterator *i, bool free_iterator);
|
||||
void *hash_next(struct hash_table *table, struct hash_iterator *i);
|
||||
void hash_rewind(struct hash_table *table, struct hash_iterator *i);
|
||||
uint32 hash_count_elements(struct hash_table *table);
|
||||
uint32 hash_count_used_slots(struct hash_table *table);
|
||||
|
||||
/* function pointers must look like this:
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user