diff options
author | Matthieu Coudron <mattator@gmail.com> | 2015-11-10 12:30:25 +0100 |
---|---|---|
committer | Michael Mann <mmann78@netscape.net> | 2015-11-11 00:22:37 +0000 |
commit | c2afc9edec79b247d02f42ba3c7cad2bc24b9f91 (patch) | |
tree | 29ee4f300505e68f3366c1e244226a167cddbaf5 /epan/wmem/wmem_tree.h | |
parent | b9b74fcf57375209a8716434c5998168e44b57ca (diff) |
Change prototype of callbacks passed to wmem_tree_foreach so that they
accept the node key as a first parameter.
wmem_tree accepts all sort of keys (strings, integers, soon ranges),
thus it is of interest for various purposes (testing, greedy search) to
know the key of the node.
Change-Id: Ie748b917bef91f0b1ba8cce15bd1b471922641dc
Reviewed-on: https://code.wireshark.org/review/11683
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Evan Huus <eapache@gmail.com>
Reviewed-by: Michael Mann <mmann78@netscape.net>
Diffstat (limited to 'epan/wmem/wmem_tree.h')
-rw-r--r-- | epan/wmem/wmem_tree.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/epan/wmem/wmem_tree.h b/epan/wmem/wmem_tree.h index 2b551a5441..33058c0174 100644 --- a/epan/wmem/wmem_tree.h +++ b/epan/wmem/wmem_tree.h @@ -204,7 +204,7 @@ wmem_tree_lookup32_array_le(wmem_tree_t *tree, wmem_tree_key_t *key); * the value of the node, userdata is whatever was passed to the traversal * function. If the function returns TRUE the traversal will end prematurely. */ -typedef gboolean (*wmem_foreach_func)(void *value, void *userdata); +typedef gboolean (*wmem_foreach_func)(const void *key, void *value, void *userdata); /** Traverse the tree and call callback(value, userdata) for each value found. * Returns TRUE if the traversal was ended prematurely by the callback. |