projects
/
babeltrace.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
lib: make bt_value_map_foreach_entry_{const_}func() return a status code
[babeltrace.git]
/
src
/
bindings
/
python
/
bt2
/
bt2
/
native_bt_value.i.h
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 94645414d568d460a1f75dd48a355f4cd09108d3..5f2b0e35cd483d5e770c7d5b4a69b7a07b330204 100644
(file)
--- 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;
};
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);
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)
}
static struct bt_value *bt_value_map_get_keys(const struct bt_value *map_obj)
This page took
0.023178 seconds
and
4
git commands to generate.