lexLeo
Loading...
Searching...
No Matches
hashtable_internal.h
1// src/foundation/data_structures/include/internal/hashtable_internal.h
2
3#ifndef HASHTABLE_INTERNAL_H
4#define HASHTABLE_INTERNAL_H
5
6#include "hashtable.h"
7#include "list.h"
8
9typedef struct entry {
10 const void *key;
11 void *value;
12} entry;
13
14struct hashtable {
15 hashtable_key_type key_type;
16 list *buckets;
17 size_t size;
18 hashtable_destroy_value_fn_t destroy_value_fn; // eg a fct that checks
19 // ref_nb to know if an interpreter environment must be destroyed
20};
21
22#ifndef UNIT_TEST
23static
24#endif
25unsigned long hash_djb2(const void *key, hashtable_key_type key_type);
26
27#endif //HASHTABLE_INTERNAL_H
Definition list.h:9
Definition hashtable_internal.h:9
Definition hashtable_internal.h:14