Rev 2479 | Rev 2595 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 2479 | Rev 2526 | ||
---|---|---|---|
Line 53... | Line 53... | ||
53 | 53 | ||
54 | /** Set of operations for hash table. */ |
54 | /** Set of operations for hash table. */ |
55 | struct hash_table_operations { |
55 | struct hash_table_operations { |
56 | /** Hash function. |
56 | /** Hash function. |
57 | * |
57 | * |
58 | * @param key Array of keys needed to compute hash index. All keys must be passed. |
58 | * @param key Array of keys needed to compute hash index. All keys |
- | 59 | * must be passed. |
|
59 | * |
60 | * |
60 | * @return Index into hash table. |
61 | * @return Index into hash table. |
61 | */ |
62 | */ |
62 | hash_index_t (* hash)(unsigned long key[]); |
63 | hash_index_t (* hash)(unsigned long key[]); |
63 | 64 | ||
64 | /** Hash table item comparison function. |
65 | /** Hash table item comparison function. |
65 | * |
66 | * |
66 | * @param key Array of keys that will be compared with item. It is not necessary to pass all keys. |
67 | * @param key Array of keys that will be compared with item. It is |
- | 68 | * not necessary to pass all keys. |
|
67 | * |
69 | * |
68 | * @return true if the keys match, false otherwise. |
70 | * @return true if the keys match, false otherwise. |
69 | */ |
71 | */ |
70 | int (*compare)(unsigned long key[], hash_count_t keys, link_t *item); |
72 | int (*compare)(unsigned long key[], hash_count_t keys, link_t *item); |
71 | 73 |