Debian Codegraph @

plugins/common/include/hashtable.h

raw symbols SCIP
1 /* Usually we will store only about 10 or so elements, however we may get
2 * cases of a fair bit more and we should handle those cases efficently.
3 * hashptr() assumes this value will fit in int.
4 */
5 #define PTR_ASSOC_TABLESIZE 251
6
7 typedef struct _ptr_assoc {
8 struct _ptr_assoc **array;
9 struct _ptr_assoc *previous;
10 struct _ptr_assoc *next;
11 void *key;
12 void *value;
13 } ptr_assoc;
14
15 typedef ptr_assoc *ptr_assoc_table[PTR_ASSOC_TABLESIZE];
16
17 extern void init_ptr_assoc_table(ptr_assoc **hash_table);
18 extern void add_ptr_assoc(ptr_assoc **hash_table, void *key, void *value);
19 extern void *find_assoc_value(ptr_assoc **hash_table, void *key);
20 extern void free_ptr_assoc(ptr_assoc **hash_table, void *key);