X-Git-Url: http://git.efficios.com/?p=babeltrace.git;a=blobdiff_plain;f=src%2Fbindings%2Fpython%2Fbt2%2Fbt2%2Fnative_bt_value.i.h;h=5f2b0e35cd483d5e770c7d5b4a69b7a07b330204;hp=94645414d568d460a1f75dd48a355f4cd09108d3;hb=27c61ce8f6ee66d910507f8a40ae5497287c943e;hpb=046094875e3f03883c14ee084f9582c0c15f3c50 diff --git a/src/bindings/python/bt2/bt2/native_bt_value.i.h b/src/bindings/python/bt2/bt2/native_bt_value.i.h index 94645414..5f2b0e35 100644 --- a/src/bindings/python/bt2/bt2/native_bt_value.i.h +++ b/src/bindings/python/bt2/bt2/native_bt_value.i.h @@ -26,17 +26,16 @@ struct bt_value_map_get_keys_data { struct bt_value *keys; }; -static int bt_value_map_get_keys_cb(const char *key, const struct bt_value *object, void *data) +static bt_value_map_foreach_entry_const_func_status bt_value_map_get_keys_cb( + const char *key, const struct bt_value *object, void *data) { - bt_value_array_append_element_status status; + int status; struct bt_value_map_get_keys_data *priv_data = data; status = bt_value_array_append_string_element(priv_data->keys, key); - if (status != __BT_FUNC_STATUS_OK) { - return BT_FALSE; - } - - return BT_TRUE; + BT_ASSERT(status == __BT_FUNC_STATUS_OK || + status == __BT_FUNC_STATUS_MEMORY_ERROR); + return status; } static struct bt_value *bt_value_map_get_keys(const struct bt_value *map_obj)