ir: remove unused event_headers member from struct bt_ctf_stream
[babeltrace.git] / formats / ctf / ir / stream.c
index 717925761336bfef2ada9b1f5b2287ff3f3fdd3e..97f179463b174a0c4b56be513868172394718d90 100644 (file)
@@ -30,8 +30,8 @@
 #include <babeltrace/ctf-ir/clock-internal.h>
 #include <babeltrace/ctf-writer/event.h>
 #include <babeltrace/ctf-ir/event-internal.h>
-#include <babeltrace/ctf-ir/event-types-internal.h>
-#include <babeltrace/ctf-ir/event-fields-internal.h>
+#include <babeltrace/ctf-ir/field-types-internal.h>
+#include <babeltrace/ctf-ir/fields-internal.h>
 #include <babeltrace/ctf-ir/stream.h>
 #include <babeltrace/ctf-ir/stream-internal.h>
 #include <babeltrace/ctf-ir/stream-class-internal.h>
@@ -68,7 +68,7 @@ int set_packet_header_magic(struct bt_ctf_stream *stream)
        assert(magic_field_type);
 
        if (bt_ctf_field_type_get_type_id(magic_field_type) !=
-               CTF_TYPE_INTEGER) {
+               BT_CTF_TYPE_ID_INTEGER) {
                /* Magic field is not an integer. Not an error, skip. */
                goto end;
        }
@@ -119,7 +119,7 @@ int set_packet_header_uuid(struct bt_ctf_stream *stream)
        uuid_field_type = bt_ctf_field_get_type(uuid_field);
        assert(uuid_field_type);
        if (bt_ctf_field_type_get_type_id(uuid_field_type) !=
-               CTF_TYPE_ARRAY) {
+               BT_CTF_TYPE_ID_ARRAY) {
                /* UUID field is not an array. Not an error, skip. */
                goto end;
        }
@@ -136,7 +136,7 @@ int set_packet_header_uuid(struct bt_ctf_stream *stream)
                uuid_field_type);
        assert(element_field_type);
        if (bt_ctf_field_type_get_type_id(element_field_type) !=
-               CTF_TYPE_INTEGER) {
+               BT_CTF_TYPE_ID_INTEGER) {
                /* UUID array elements are not integers. Not an error, skip */
                goto end;
        }
@@ -192,7 +192,7 @@ int set_packet_header_stream_id(struct bt_ctf_stream *stream)
        stream_id_field_type = bt_ctf_field_get_type(stream_id_field);
        assert(stream_id_field_type);
        if (bt_ctf_field_type_get_type_id(stream_id_field_type) !=
-               CTF_TYPE_INTEGER) {
+               BT_CTF_TYPE_ID_INTEGER) {
                /* stream_id field is not an integer. Not an error, skip. */
                goto end;
        }
@@ -584,7 +584,8 @@ int bt_ctf_stream_set_packet_context(struct bt_ctf_stream *stream,
        }
 
        field_type = bt_ctf_field_get_type(field);
-       if (field_type != stream->stream_class->packet_context_type) {
+       if (bt_ctf_field_type_compare(field_type,
+                       stream->stream_class->packet_context_type)) {
                ret = -1;
                goto end;
        }
@@ -626,7 +627,8 @@ int bt_ctf_stream_set_event_context(struct bt_ctf_stream *stream,
        }
 
        field_type = bt_ctf_field_get_type(field);
-       if (field_type != stream->stream_class->event_context_type) {
+       if (bt_ctf_field_type_compare(field_type,
+                       stream->stream_class->event_context_type)) {
                ret = -1;
                goto end;
        }
@@ -670,7 +672,7 @@ int bt_ctf_stream_set_packet_header(struct bt_ctf_stream *stream,
 
        trace = (struct bt_ctf_trace *) bt_object_get_parent(stream);
        field_type = bt_ctf_field_get_type(field);
-       if (field_type != trace->packet_header_type) {
+       if (bt_ctf_field_type_compare(field_type, trace->packet_header_type)) {
                ret = -1;
                goto end;
        }
@@ -701,7 +703,7 @@ int get_event_header_timestamp(struct bt_ctf_field *event_header, uint64_t *time
        timestamp_field_type = bt_ctf_field_get_type(timestamp_field);
        assert(timestamp_field_type);
        if (bt_ctf_field_type_get_type_id(timestamp_field_type) !=
-               CTF_TYPE_INTEGER) {
+               BT_CTF_TYPE_ID_INTEGER) {
                ret = -1;
                goto end;
        }
@@ -953,7 +955,7 @@ int set_structure_field_integer(struct bt_ctf_field *structure, char *name,
        field_type = bt_ctf_field_get_type(integer);
        /* Something is serioulsly wrong */
        assert(field_type);
-       if (bt_ctf_field_type_get_type_id(field_type) != CTF_TYPE_INTEGER) {
+       if (bt_ctf_field_type_get_type_id(field_type) != BT_CTF_TYPE_ID_INTEGER) {
                /*
                 * The user most likely meant for us to populate this field
                 * automatically. However, we can only do this if the field
This page took 0.030214 seconds and 4 git commands to generate.