This source file includes following definitions.
- hash_xinitialize
- hash_xinsert
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18 #include <config.h>
19
20
21 #include "hash.h"
22
23 #include "xalloc.h"
24
25 Hash_table *
26 hash_xinitialize (size_t candidate, const Hash_tuning *tuning,
27 Hash_hasher hasher, Hash_comparator comparator,
28 Hash_data_freer data_freer)
29 {
30 Hash_table *res =
31 hash_initialize (candidate, tuning, hasher, comparator, data_freer);
32 if (!res)
33 xalloc_die ();
34 return res;
35 }
36
37 void *
38 hash_xinsert (Hash_table *table, void const *entry)
39 {
40 void *res = hash_insert (table, entry);
41 if (!res)
42 xalloc_die ();
43 return res;
44 }