#include <babeltrace/graph/notification-event-internal.h>
#include <babeltrace/graph/notification-packet-internal.h>
#include <babeltrace/compiler-internal.h>
+#include <babeltrace/common-internal.h>
#include <babeltrace/types.h>
#include <babeltrace/values.h>
+#include <babeltrace/private-values.h>
#include <babeltrace/values-internal.h>
#include <babeltrace/assert-internal.h>
#include <babeltrace/assert-pre-internal.h>
end:
return graph;
error:
- BT_PUT(graph);
+ BT_OBJECT_PUT_REF_AND_RESET(graph);
goto end;
}
}
end:
- bt_put(upstream_graph);
- bt_put(downstream_graph);
- bt_put(upstream_component);
- bt_put(downstream_component);
- bt_put(connection);
+ bt_object_put_ref(upstream_graph);
+ bt_object_put_ref(downstream_graph);
+ bt_object_put_ref(upstream_component);
+ bt_object_put_ref(downstream_component);
+ bt_object_put_ref(connection);
if (graph) {
(void) init_can_consume;
bt_graph_set_can_consume(graph, init_can_consume);
size_t i;
bt_bool init_can_consume;
- bt_get(params);
+ bt_object_get_ref(params);
if (!graph) {
BT_LOGW_STR("Invalid parameter: graph is NULL.");
if (!bt_value_is_map(params)) {
BT_LOGW("Invalid parameter: initialization parameters must be a map value: "
"type=%s",
- bt_value_type_string(bt_value_get_type(params)));
+ bt_common_value_type_string(
+ bt_value_get_type(params)));
graph_status = BT_GRAPH_STATUS_INVALID;
goto end;
}
} else {
- params = bt_value_map_create();
+ params = bt_value_borrow_from_private(
+ bt_private_value_map_create());
if (!params) {
BT_LOGE_STR("Cannot create map value object.");
graph_status = BT_GRAPH_STATUS_NOMEM;
}
end:
- bt_put(component);
- bt_put(params);
+ bt_object_put_ref(component);
+ bt_object_put_ref(params);
if (graph) {
graph->can_consume = init_can_consume;
}
bt_component_get_input_port_by_index(component, i);
BT_ASSERT(port);
- bt_put(port);
+ bt_object_put_ref(port);
if (bt_port_is_connected(port)) {
BT_LOGW("Cannot remove component from graph: "
bt_component_get_output_port_by_index(component, i);
BT_ASSERT(port);
- bt_put(port);
+ bt_object_put_ref(port);
if (bt_port_is_connected(port)) {
BT_LOGW("Cannot remove component from graph: "