bt2: add option field class and field support
[babeltrace.git] / src / lib / trace-ir / trace.c
index 1085d890bf5b457dab438ea156e8dbdcc8abd055..7b1749ebf847730aa02cf1bf584c2f1ac436a2a5 100644 (file)
@@ -239,7 +239,7 @@ bool trace_has_environment_entry(const struct bt_trace *trace, const char *name)
        BT_ASSERT(trace);
 
        return bt_attributes_borrow_field_value_by_name(
-               trace->environment, name) != NULL;
+               trace->environment, name);
 }
 
 static
@@ -305,7 +305,7 @@ bt_trace_set_environment_entry_integer(
        struct bt_value *value_obj;
        BT_ASSERT_PRE_NON_NULL(trace, "Trace");
        BT_ASSERT_PRE_NON_NULL(name, "Name");
-       value_obj = bt_value_signed_integer_create_init(value);
+       value_obj = bt_value_integer_signed_create_init(value);
        if (!value_obj) {
                BT_LIB_LOGE_APPEND_CAUSE(
                        "Cannot create an integer value object.");
@@ -406,7 +406,7 @@ const struct bt_stream *bt_trace_borrow_stream_by_id_const(
 enum bt_trace_add_listener_status bt_trace_add_destruction_listener(
                const struct bt_trace *c_trace,
                bt_trace_destruction_listener_func listener,
-               void *data, uint64_t *listener_id)
+               void *data, bt_listener_id *listener_id)
 {
        struct bt_trace *trace = (void *) c_trace;
        uint64_t i;
@@ -450,11 +450,11 @@ bool has_listener_id(const struct bt_trace *trace, uint64_t listener_id)
        BT_ASSERT(listener_id < trace->destruction_listeners->len);
        return (&g_array_index(trace->destruction_listeners,
                        struct bt_trace_destruction_listener_elem,
-                       listener_id))->func != NULL;
+                       listener_id))->func;
 }
 
 enum bt_trace_remove_listener_status bt_trace_remove_destruction_listener(
-               const struct bt_trace *c_trace, uint64_t listener_id)
+               const struct bt_trace *c_trace, bt_listener_id listener_id)
 {
        struct bt_trace *trace = (void *) c_trace;
        struct bt_trace_destruction_listener_elem *elem;
This page took 0.042432 seconds and 4 git commands to generate.