File tree Expand file tree Collapse file tree 1 file changed +12
-4
lines changed
Expand file tree Collapse file tree 1 file changed +12
-4
lines changed Original file line number Diff line number Diff line change @@ -8,11 +8,19 @@ Data Structures
88
99`struct hashmap`::
1010
11- The hash table structure.
11+ The hash table structure. Members can be used as follows, but should
12+ not be modified directly:
1213+
13- The `size` member keeps track of the total number of entries. The `cmpfn`
14- member is a function used to compare two entries for equality. The `table` and
15- `tablesize` members store the hash table and its size, respectively.
14+ The `size` member keeps track of the total number of entries (0 means the
15+ hashmap is empty).
16+ +
17+ `tablesize` is the allocated size of the hash table. A non-0 value indicates
18+ that the hashmap is initialized. It may also be useful for statistical purposes
19+ (i.e. `size / tablesize` is the current load factor).
20+ +
21+ `cmpfn` stores the comparison function specified in `hashmap_init()`. In
22+ advanced scenarios, it may be useful to change this, e.g. to switch between
23+ case-sensitive and case-insensitive lookup.
1624
1725`struct hashmap_entry`::
1826
You can’t perform that action at this time.
0 commit comments