-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathght_first_keysize.3
44 lines (34 loc) · 1.42 KB
/
ght_first_keysize.3
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
.TH ght_first_keysize 3 "2007-07-15" "libghthash" "libghthash User Manual"
.SH NAME
ght_first_keysize \- return the first element in the table for iteration
.SH SYNOPSIS
.B #include <ght_hash_table.h>
.BI "void *ght_first_keysize(ght_hash_table_t *" p_ht ", ght_iterator_t *" p_it ", void **" pp_key ", unsigned int *" size ");"
.SH DESCRIPTION
'Return the first element in an iteration.
.I p_ht
is the hash table to iterate in,
.I p_it
is a pointer to the iterator to initialize, and
.I pp_key
is filled in with a pointer to the key for the current item.
.I size
is filled in with the size for this key
This function should be used for iteration and is used together with
.I ght_next_keysize() or .I ght_next()
Note that you cannot assume anything about the order in which the entries are
accessed. If an entry is inserted during an iteration, the entry might or
might not occur in the iteration. Note that removal during an iteration is
only safe for the current entry or an entry which has already been iterated
over.
The use of the
.I ght_iterator_t
allows for several concurrent iterations, where you would use one
.I ght_iterator_t
for each iteration. In threaded environments, you should still lock access to
the hash table for insertion and removal.
.SH SEE ALSO
.BR ght_next_keysize (3),
libghthash is fully documented with Doxygen (in {prefix}/doc/libghthash/html/).
.SH AUTHOR
This manual page was created by Simon Kagstrom <[email protected]>.