projects
/
babeltrace.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
lib: update and simplify the `bt_object` API
[babeltrace.git]
/
lib
/
ctf-ir
/
trace.c
diff --git
a/lib/ctf-ir/trace.c
b/lib/ctf-ir/trace.c
index eb4211cf8885d739b45bf3ce0c8ad922b2c1b643..c9a588fbe063fb6170064a84801479a035e87cb0 100644
(file)
--- a/
lib/ctf-ir/trace.c
+++ b/
lib/ctf-ir/trace.c
@@
-117,7
+117,7
@@
int bt_trace_common_initialize(struct bt_trace_common *trace,
BT_LOGD_STR("Initializing common trace object.");
trace->native_byte_order = BT_BYTE_ORDER_UNSPECIFIED;
BT_LOGD_STR("Initializing common trace object.");
trace->native_byte_order = BT_BYTE_ORDER_UNSPECIFIED;
- bt_object_init
(trac
e, release_func);
+ bt_object_init
_shared_with_parent(&trace->bas
e, release_func);
trace->clock_classes = g_ptr_array_new_with_free_func(
(GDestroyNotify) bt_put);
if (!trace->clock_classes) {
trace->clock_classes = g_ptr_array_new_with_free_func(
(GDestroyNotify) bt_put);
if (!trace->clock_classes) {
@@
-126,14
+126,14
@@
int bt_trace_common_initialize(struct bt_trace_common *trace,
}
trace->streams = g_ptr_array_new_with_free_func(
}
trace->streams = g_ptr_array_new_with_free_func(
- (GDestroyNotify) bt_object_release);
+ (GDestroyNotify) bt_object_
try_spec_
release);
if (!trace->streams) {
BT_LOGE_STR("Failed to allocate one GPtrArray.");
goto error;
}
trace->stream_classes = g_ptr_array_new_with_free_func(
if (!trace->streams) {
BT_LOGE_STR("Failed to allocate one GPtrArray.");
goto error;
}
trace->stream_classes = g_ptr_array_new_with_free_func(
- (GDestroyNotify) bt_object_release);
+ (GDestroyNotify) bt_object_
try_spec_
release);
if (!trace->stream_classes) {
BT_LOGE_STR("Failed to allocate one GPtrArray.");
goto error;
if (!trace->stream_classes) {
BT_LOGE_STR("Failed to allocate one GPtrArray.");
goto error;
@@
-1412,7
+1412,7
@@
int bt_trace_common_add_stream_class(struct bt_trace_common *trace,
}
}
}
}
- bt_object_set_parent(
stream_class, trac
e);
+ bt_object_set_parent(
&stream_class->base, &trace->bas
e);
g_ptr_array_add(trace->stream_classes, stream_class);
/*
g_ptr_array_add(trace->stream_classes, stream_class);
/*
@@
-1473,7
+1473,7
@@
int bt_trace_common_add_stream_class(struct bt_trace_common *trace,
end:
if (ret) {
end:
if (ret) {
- bt_object_set_parent(
stream_class
, NULL);
+ bt_object_set_parent(
&stream_class->base
, NULL);
if (ec_validation_outputs) {
for (i = 0; i < event_class_count; i++) {
if (ec_validation_outputs) {
for (i = 0; i < event_class_count; i++) {
This page took
0.025707 seconds
and
4
git commands to generate.