From cbcfcefc450184b8c76e94e4e90f3e32d6cf71d7 Mon Sep 17 00:00:00 2001 From: Philippe Proulx Date: Wed, 25 Jan 2017 02:37:54 -0500 Subject: [PATCH] values.h: doc: rephrase map foreach callback ref MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Philippe Proulx Signed-off-by: Jérémie Galarneau --- include/babeltrace/values.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/include/babeltrace/values.h b/include/babeltrace/values.h index 215ff63f..93622a86 100644 --- a/include/babeltrace/values.h +++ b/include/babeltrace/values.h @@ -1146,7 +1146,7 @@ extern struct bt_value *bt_value_map_get(const struct bt_value *map_obj, @brief User function type to use with bt_value_map_foreach(). \p object is a weak reference: you \em must pass it to bt_get() -if you need your own reference. +if you need to keep a reference after this function returns. This function \em must return \c true to continue the map value object traversal, or \c false to break it. @@ -1169,7 +1169,8 @@ typedef bool (* bt_value_map_foreach_cb)(const char *key, map value object \p map_obj. The value object passed to the user function is a weak reference: -you \em must pass it to bt_get() if you need your own reference. +you \em must pass it to bt_get() if you need to keep a persistent +reference after the user function returns. The key passed to the user function is only valid in the scope of this user function call. -- 2.34.1