1dictModifyValue(3)                util/dict.h               dictModifyValue(3)
2
3
4

NAME

6       dictModifyValue  - create/modify an item.
7

SYNOPSIS

9       #include <util/dict.h>
10
11
12       NEOERR *dictModifyValue(dictCtx dict, const char *id, dictNewValueCB new_cb,
13                            dictUpdateValueCB update, void *rock);
14
15
16
17

ARGUMENTS

19       dict - dictionary to add pair to.
20       id - identifier of value
21       new - function to call to create new value (may be NULL)
22       update - function to call to modify value (if NULL, the old
23       value is freed, and <new> is used)
24       rock - context to pass to <new> or <update>.
25
26

DESCRIPTION

28       Finds <id>'s value and calls <update>.  If <id> is not in <dict>, calls
29       <new> to obtain a new value.
30
31       MT-Level: Safe if <dict> thread-safe.
32
33

RETURN VALUE

35       None.
36
37

SEE ALSO

39       dictDestroy(3),  dictCleanup(3),   dictReleaseLock(3),   dictRemove(3),
40       dictNext(3),  dictCreate(3), dictSetValue(3), dictModifyValue(3), dict‐
41       Search
42
43
44
45ClearSilver                      12 July 2007               dictModifyValue(3)
Impressum