From: Philippe Proulx Date: Wed, 25 Jan 2017 07:37:54 +0000 (-0500) Subject: values.h: doc: rephrase map foreach callback ref X-Git-Url: http://drtracing.org/?a=commitdiff_plain;h=cbcfcefc450184b8c76e94e4e90f3e32d6cf71d7;p=deliverable%2Fbabeltrace.git values.h: doc: rephrase map foreach callback ref Signed-off-by: Philippe Proulx Signed-off-by: Jérémie Galarneau --- diff --git a/include/babeltrace/values.h b/include/babeltrace/values.h index 215ff63fd..93622a86e 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.