Namespace the struct definition
authorJulien Desfossez <jdesfossez@efficios.com>
Fri, 15 Feb 2013 19:22:09 +0000 (14:22 -0500)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Fri, 15 Feb 2013 19:22:09 +0000 (14:22 -0500)
This struct is exposed in the public API, so we need to namespace it.

Signed-off-by: Julien Desfossez <jdesfossez@efficios.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
32 files changed:
formats/ctf-text/ctf-text.c
formats/ctf-text/types/array.c
formats/ctf-text/types/enum.c
formats/ctf-text/types/float.c
formats/ctf-text/types/integer.c
formats/ctf-text/types/sequence.c
formats/ctf-text/types/string.c
formats/ctf-text/types/struct.c
formats/ctf-text/types/variant.c
formats/ctf/ctf.c
formats/ctf/events.c
formats/ctf/types/array.c
formats/ctf/types/enum.c
formats/ctf/types/float.c
formats/ctf/types/integer.c
formats/ctf/types/sequence.c
formats/ctf/types/string.c
formats/ctf/types/struct.c
formats/ctf/types/variant.c
include/babeltrace/ctf-text/types.h
include/babeltrace/ctf/events.h
include/babeltrace/ctf/types.h
include/babeltrace/types.h
types/array.c
types/enum.c
types/float.c
types/integer.c
types/sequence.c
types/string.c
types/struct.c
types/types.c
types/variant.c

index cd691250f417515ebd0fd64dea1ad12aef3125e5..e9fd74180dcd9594d7a5a07b35ef6207c67e7ebb 100644 (file)
@@ -135,7 +135,7 @@ struct ctf_callsite_dups *ctf_trace_callsite_lookup(struct ctf_trace *trace,
                        (gpointer) (unsigned long) callsite_name);
 }
 
-int print_field(struct definition *definition)
+int print_field(struct bt_definition *definition)
 {
        /* Print all fields in verbose mode */
        if (babeltrace_verbose)
index 9e7d49fa3e202b855c038e2ca6fa38a65ea9a259..d9f57a2f7133965370dd78d8fedd7d107e1e77ed 100644 (file)
@@ -29,7 +29,7 @@
 #include <babeltrace/ctf-text/types.h>
 #include <stdio.h>
 
-int ctf_text_array_write(struct bt_stream_pos *ppos, struct definition *definition)
+int ctf_text_array_write(struct bt_stream_pos *ppos, struct bt_definition *definition)
 {
        struct ctf_text_stream_pos *pos = ctf_text_pos(ppos);
        struct definition_array *array_definition =
index 8a2463bb7db54cc300d7b7dceb7d6dc8957d88b7..647050029fd0a7ba0ffb2b224092f6e86757d5e4 100644 (file)
@@ -30,7 +30,7 @@
 #include <stdio.h>
 #include <stdint.h>
 
-int ctf_text_enum_write(struct bt_stream_pos *ppos, struct definition *definition)
+int ctf_text_enum_write(struct bt_stream_pos *ppos, struct bt_definition *definition)
 {
        struct definition_enum *enum_definition =
                container_of(definition, struct definition_enum, p);
index a9254800ff4d74a5513f30550adefcf67d286b59..a4946f910eade757b0410e9bad358fca8ef6370f 100644 (file)
@@ -31,7 +31,7 @@
 #include <babeltrace/ctf-text/types.h>
 #include <stdio.h>
 
-int ctf_text_float_write(struct bt_stream_pos *ppos, struct definition *definition)
+int ctf_text_float_write(struct bt_stream_pos *ppos, struct bt_definition *definition)
 {
        struct definition_float *float_definition =
                container_of(definition, struct definition_float, p);
index 3a469f611ae2e2bd1a4c483d4742df19ef3ba15b..7363b524e6f1b9af5d896cd55630bcb3990b7c0c 100644 (file)
@@ -32,7 +32,7 @@
 #include <stdint.h>
 #include <babeltrace/bitfield.h>
 
-int ctf_text_integer_write(struct bt_stream_pos *ppos, struct definition *definition)
+int ctf_text_integer_write(struct bt_stream_pos *ppos, struct bt_definition *definition)
 {
        struct definition_integer *integer_definition =
                container_of(definition, struct definition_integer, p);
index 61be860194eb10abcc7454741c59b525fb3f04d5..706fe5e908279bd47a7d2eb22c3b5903c87f1379 100644 (file)
@@ -29,7 +29,7 @@
 #include <babeltrace/ctf-text/types.h>
 #include <stdio.h>
 
-int ctf_text_sequence_write(struct bt_stream_pos *ppos, struct definition *definition)
+int ctf_text_sequence_write(struct bt_stream_pos *ppos, struct bt_definition *definition)
 {
        struct ctf_text_stream_pos *pos = ctf_text_pos(ppos);
        struct definition_sequence *sequence_definition =
index f49d1b7e4459ff239a3d7e1bc93525f0f5bdf1b9..c397f0e2dfa720ebc150f0b96efd5fc2d3540c14 100644 (file)
@@ -32,7 +32,7 @@
 #include <string.h>
 
 int ctf_text_string_write(struct bt_stream_pos *ppos,
-                         struct definition *definition)
+                         struct bt_definition *definition)
 {
        struct definition_string *string_definition =
                container_of(definition, struct definition_string, p);
index a727a89c97deb3579c1d5a536f2eae862dc44c72..1b9e27e10ce948a66c15b39640146c6ec87c9364 100644 (file)
@@ -29,7 +29,7 @@
 #include <babeltrace/ctf-text/types.h>
 #include <stdio.h>
 
-int ctf_text_struct_write(struct bt_stream_pos *ppos, struct definition *definition)
+int ctf_text_struct_write(struct bt_stream_pos *ppos, struct bt_definition *definition)
 {
        struct declaration *declaration = definition->declaration;
        struct declaration_struct *struct_declaration =
index ca7c1ae0b8d8e24d70e0adfbd09f85078745c10e..3aeb6ec274dc599bca4338cb18fc5b09a9f2b1c3 100644 (file)
@@ -29,7 +29,7 @@
 #include <babeltrace/ctf-text/types.h>
 #include <stdio.h>
 
-int ctf_text_variant_write(struct bt_stream_pos *ppos, struct definition *definition)
+int ctf_text_variant_write(struct bt_stream_pos *ppos, struct bt_definition *definition)
 {
        struct ctf_text_stream_pos *pos = ctf_text_pos(ppos);
        int field_nr_saved;
index aea12a106014be06b2a6ca2a39fd409d82bb237d..5a5149572f76fd3cf2210766700a98a28575e482 100644 (file)
@@ -421,7 +421,7 @@ int ctf_read_event(struct bt_stream_pos *ppos, struct ctf_stream_definition *str
        /* Read event header */
        if (likely(stream->stream_event_header)) {
                struct definition_integer *integer_definition;
-               struct definition *variant;
+               struct bt_definition *variant;
 
                ret = generic_rw(ppos, &stream->stream_event_header->p);
                if (unlikely(ret))
@@ -1150,7 +1150,7 @@ struct ctf_event_definition *create_event_definitions(struct ctf_trace *td,
        struct ctf_event_definition *stream_event = g_new0(struct ctf_event_definition, 1);
 
        if (event->context_decl) {
-               struct definition *definition =
+               struct bt_definition *definition =
                        event->context_decl->p.definition_new(&event->context_decl->p,
                                stream->parent_def_scope, 0, 0, "event.context");
                if (!definition) {
@@ -1161,7 +1161,7 @@ struct ctf_event_definition *create_event_definitions(struct ctf_trace *td,
                stream->parent_def_scope = stream_event->event_context->p.scope;
        }
        if (event->fields_decl) {
-               struct definition *definition =
+               struct bt_definition *definition =
                        event->fields_decl->p.definition_new(&event->fields_decl->p,
                                stream->parent_def_scope, 0, 0, "event.fields");
                if (!definition) {
@@ -1195,7 +1195,7 @@ int create_stream_definitions(struct ctf_trace *td, struct ctf_stream_definition
        stream_class = stream->stream_class;
 
        if (stream_class->packet_context_decl) {
-               struct definition *definition =
+               struct bt_definition *definition =
                        stream_class->packet_context_decl->p.definition_new(&stream_class->packet_context_decl->p,
                                stream->parent_def_scope, 0, 0, "stream.packet.context");
                if (!definition) {
@@ -1207,7 +1207,7 @@ int create_stream_definitions(struct ctf_trace *td, struct ctf_stream_definition
                stream->parent_def_scope = stream->stream_packet_context->p.scope;
        }
        if (stream_class->event_header_decl) {
-               struct definition *definition =
+               struct bt_definition *definition =
                        stream_class->event_header_decl->p.definition_new(&stream_class->event_header_decl->p,
                                stream->parent_def_scope, 0, 0, "stream.event.header");
                if (!definition) {
@@ -1219,7 +1219,7 @@ int create_stream_definitions(struct ctf_trace *td, struct ctf_stream_definition
                stream->parent_def_scope = stream->stream_event_header->p.scope;
        }
        if (stream_class->event_context_decl) {
-               struct definition *definition =
+               struct bt_definition *definition =
                        stream_class->event_context_decl->p.definition_new(&stream_class->event_context_decl->p,
                                stream->parent_def_scope, 0, 0, "stream.event.context");
                if (!definition) {
@@ -1321,7 +1321,7 @@ int create_stream_packet_index(struct ctf_trace *td,
                                return ret;
                        len_index = bt_struct_declaration_lookup_field_index(file_stream->parent.trace_packet_header->declaration, g_quark_from_static_string("magic"));
                        if (len_index >= 0) {
-                               struct definition *field;
+                               struct bt_definition *field;
                                uint64_t magic;
 
                                field = bt_struct_definition_get_field_from_index(file_stream->parent.trace_packet_header, len_index);
@@ -1339,7 +1339,7 @@ int create_stream_packet_index(struct ctf_trace *td,
                        len_index = bt_struct_declaration_lookup_field_index(file_stream->parent.trace_packet_header->declaration, g_quark_from_static_string("uuid"));
                        if (len_index >= 0) {
                                struct definition_array *defarray;
-                               struct definition *field;
+                               struct bt_definition *field;
                                uint64_t i;
                                uint8_t uuidval[BABELTRACE_UUID_LEN];
 
@@ -1349,7 +1349,7 @@ int create_stream_packet_index(struct ctf_trace *td,
                                assert(bt_array_len(defarray) == BABELTRACE_UUID_LEN);
 
                                for (i = 0; i < BABELTRACE_UUID_LEN; i++) {
-                                       struct definition *elem;
+                                       struct bt_definition *elem;
 
                                        elem = bt_array_index(defarray, i);
                                        uuidval[i] = bt_get_unsigned_int(elem);
@@ -1364,7 +1364,7 @@ int create_stream_packet_index(struct ctf_trace *td,
 
                        len_index = bt_struct_declaration_lookup_field_index(file_stream->parent.trace_packet_header->declaration, g_quark_from_static_string("stream_id"));
                        if (len_index >= 0) {
-                               struct definition *field;
+                               struct bt_definition *field;
 
                                field = bt_struct_definition_get_field_from_index(file_stream->parent.trace_packet_header, len_index);
                                stream_id = bt_get_unsigned_int(field);
@@ -1401,7 +1401,7 @@ int create_stream_packet_index(struct ctf_trace *td,
                        /* read content size from header */
                        len_index = bt_struct_declaration_lookup_field_index(file_stream->parent.stream_packet_context->declaration, g_quark_from_static_string("content_size"));
                        if (len_index >= 0) {
-                               struct definition *field;
+                               struct bt_definition *field;
 
                                field = bt_struct_definition_get_field_from_index(file_stream->parent.stream_packet_context, len_index);
                                packet_index.content_size = bt_get_unsigned_int(field);
@@ -1413,7 +1413,7 @@ int create_stream_packet_index(struct ctf_trace *td,
                        /* read packet size from header */
                        len_index = bt_struct_declaration_lookup_field_index(file_stream->parent.stream_packet_context->declaration, g_quark_from_static_string("packet_size"));
                        if (len_index >= 0) {
-                               struct definition *field;
+                               struct bt_definition *field;
 
                                field = bt_struct_definition_get_field_from_index(file_stream->parent.stream_packet_context, len_index);
                                packet_index.packet_size = bt_get_unsigned_int(field);
@@ -1425,7 +1425,7 @@ int create_stream_packet_index(struct ctf_trace *td,
                        /* read timestamp begin from header */
                        len_index = bt_struct_declaration_lookup_field_index(file_stream->parent.stream_packet_context->declaration, g_quark_from_static_string("timestamp_begin"));
                        if (len_index >= 0) {
-                               struct definition *field;
+                               struct bt_definition *field;
 
                                field = bt_struct_definition_get_field_from_index(file_stream->parent.stream_packet_context, len_index);
                                packet_index.timestamp_begin = bt_get_unsigned_int(field);
@@ -1440,7 +1440,7 @@ int create_stream_packet_index(struct ctf_trace *td,
                        /* read timestamp end from header */
                        len_index = bt_struct_declaration_lookup_field_index(file_stream->parent.stream_packet_context->declaration, g_quark_from_static_string("timestamp_end"));
                        if (len_index >= 0) {
-                               struct definition *field;
+                               struct bt_definition *field;
 
                                field = bt_struct_definition_get_field_from_index(file_stream->parent.stream_packet_context, len_index);
                                packet_index.timestamp_end = bt_get_unsigned_int(field);
@@ -1455,7 +1455,7 @@ int create_stream_packet_index(struct ctf_trace *td,
                        /* read events discarded from header */
                        len_index = bt_struct_declaration_lookup_field_index(file_stream->parent.stream_packet_context->declaration, g_quark_from_static_string("events_discarded"));
                        if (len_index >= 0) {
-                               struct definition *field;
+                               struct bt_definition *field;
 
                                field = bt_struct_definition_get_field_from_index(file_stream->parent.stream_packet_context, len_index);
                                packet_index.events_discarded = bt_get_unsigned_int(field);
@@ -1499,7 +1499,7 @@ int create_trace_definitions(struct ctf_trace *td, struct ctf_stream_definition
        int ret;
 
        if (td->packet_header_decl) {
-               struct definition *definition =
+               struct bt_definition *definition =
                        td->packet_header_decl->p.definition_new(&td->packet_header_decl->p,
                                stream->parent_def_scope, 0, 0, "trace.packet.header");
                if (!definition) {
index d9460b169e98e68ebb0c0f6a9630b4f563f4d522..af7f5e15cd07a42d116f8be1e669cdd2c8b11a5f 100644 (file)
  */
 __thread int bt_ctf_last_field_error = 0;
 
-const struct definition *bt_ctf_get_top_level_scope(const struct bt_ctf_event *ctf_event,
+const struct bt_definition *bt_ctf_get_top_level_scope(const struct bt_ctf_event *ctf_event,
                enum bt_ctf_scope scope)
 {
-       const struct definition *tmp = NULL;
+       const struct bt_definition *tmp = NULL;
        const struct ctf_event_definition *event;
 
        if (!ctf_event)
@@ -96,11 +96,11 @@ error:
        return NULL;
 }
 
-const struct definition *bt_ctf_get_field(const struct bt_ctf_event *ctf_event,
-               const struct definition *scope,
+const struct bt_definition *bt_ctf_get_field(const struct bt_ctf_event *ctf_event,
+               const struct bt_definition *scope,
                const char *field)
 {
-       const struct definition *def;
+       const struct bt_definition *def;
        char *field_underscore;
 
        if (!ctf_event || !scope || !field)
@@ -127,11 +127,11 @@ const struct definition *bt_ctf_get_field(const struct bt_ctf_event *ctf_event,
        return def;
 }
 
-const struct definition *bt_ctf_get_index(const struct bt_ctf_event *ctf_event,
-               const struct definition *field,
+const struct bt_definition *bt_ctf_get_index(const struct bt_ctf_event *ctf_event,
+               const struct bt_definition *field,
                unsigned int index)
 {
-       struct definition *ret = NULL;
+       struct bt_definition *ret = NULL;
 
        if (!ctf_event || !field)
                return NULL;
@@ -166,7 +166,7 @@ const char *bt_ctf_event_name(const struct bt_ctf_event *ctf_event)
        return g_quark_to_string(event_class->name);
 }
 
-const char *bt_ctf_field_name(const struct definition *def)
+const char *bt_ctf_field_name(const struct bt_definition *def)
 {
        if (!def || !def->name)
                return NULL;
@@ -183,8 +183,8 @@ enum ctf_type_id bt_ctf_field_type(const struct declaration *decl)
 }
 
 int bt_ctf_get_field_list(const struct bt_ctf_event *ctf_event,
-               const struct definition *scope,
-               struct definition const * const **list,
+               const struct bt_definition *scope,
+               struct bt_definition const * const **list,
                unsigned int *count)
 {
        if (!ctf_event || !scope || !list || !count)
@@ -204,7 +204,7 @@ int bt_ctf_get_field_list(const struct bt_ctf_event *ctf_event,
                if (!def_struct)
                        goto error;
                if (def_struct->fields->pdata) {
-                       *list = (struct definition const* const*) def_struct->fields->pdata;
+                       *list = (struct bt_definition const* const*) def_struct->fields->pdata;
                        *count = def_struct->fields->len;
                        goto end;
                } else {
@@ -222,7 +222,7 @@ int bt_ctf_get_field_list(const struct bt_ctf_event *ctf_event,
                if (!def_variant)
                        goto error;
                if (def_variant->fields->pdata) {
-                       *list = (struct definition const* const*) def_variant->fields->pdata;
+                       *list = (struct bt_definition const* const*) def_variant->fields->pdata;
                        *count = def_variant->fields->len;
                        goto end;
                } else {
@@ -238,7 +238,7 @@ int bt_ctf_get_field_list(const struct bt_ctf_event *ctf_event,
                if (!def_array)
                        goto error;
                if (def_array->elems->pdata) {
-                       *list = (struct definition const* const*) def_array->elems->pdata;
+                       *list = (struct bt_definition const* const*) def_array->elems->pdata;
                        *count = def_array->elems->len;
                        goto end;
                } else {
@@ -254,7 +254,7 @@ int bt_ctf_get_field_list(const struct bt_ctf_event *ctf_event,
                if (!def_sequence)
                        goto error;
                if (def_sequence->elems->pdata) {
-                       *list = (struct definition const* const*) def_sequence->elems->pdata;
+                       *list = (struct bt_definition const* const*) def_sequence->elems->pdata;
                        *count = def_sequence->elems->len;
                        goto end;
                } else {
@@ -437,7 +437,7 @@ ssize_t bt_ctf_get_int_len(const struct declaration *decl)
        return (ssize_t) integer->len;
 }
 
-const struct definition *bt_ctf_get_enum_int(const struct definition *field)
+const struct bt_definition *bt_ctf_get_enum_int(const struct bt_definition *field)
 {
        const struct definition_enum *def_enum;
 
@@ -449,7 +449,7 @@ const struct definition *bt_ctf_get_enum_int(const struct definition *field)
        return &def_enum->integer->p;
 }
 
-const char *bt_ctf_get_enum_str(const struct definition *field)
+const char *bt_ctf_get_enum_str(const struct bt_definition *field)
 {
        const struct definition_enum *def_enum;
        const struct declaration_enum *decl_enum;
@@ -554,7 +554,7 @@ error:
        return -1;
 }
 
-uint64_t bt_ctf_get_uint64(const struct definition *field)
+uint64_t bt_ctf_get_uint64(const struct bt_definition *field)
 {
        uint64_t ret = 0;
 
@@ -566,7 +566,7 @@ uint64_t bt_ctf_get_uint64(const struct definition *field)
        return ret;
 }
 
-int64_t bt_ctf_get_int64(const struct definition *field)
+int64_t bt_ctf_get_int64(const struct bt_definition *field)
 {
        int64_t ret = 0;
 
@@ -578,7 +578,7 @@ int64_t bt_ctf_get_int64(const struct definition *field)
        return ret;
 }
 
-char *bt_ctf_get_char_array(const struct definition *field)
+char *bt_ctf_get_char_array(const struct bt_definition *field)
 {
        char *ret = NULL;
        GString *char_array;
@@ -596,7 +596,7 @@ end:
        return ret;
 }
 
-char *bt_ctf_get_string(const struct definition *field)
+char *bt_ctf_get_string(const struct bt_definition *field)
 {
        char *ret = NULL;
 
@@ -767,7 +767,7 @@ const char *bt_ctf_get_decl_field_name(const struct bt_ctf_field_decl *field)
        return rem_(g_quark_to_string(((struct declaration_field *) field)->name));
 }
 
-const struct declaration *bt_ctf_get_decl_from_def(const struct definition *def)
+const struct declaration *bt_ctf_get_decl_from_def(const struct bt_definition *def)
 {
        if (def)
                return def->declaration;
index b1cbe2ffc77748a3e7389217ea495857e0faae87..683c1716099de06bea3d1700c84ac82ed380c323 100644 (file)
@@ -28,7 +28,7 @@
 
 #include <babeltrace/ctf/types.h>
 
-int ctf_array_read(struct bt_stream_pos *ppos, struct definition *definition)
+int ctf_array_read(struct bt_stream_pos *ppos, struct bt_definition *definition)
 {
        struct definition_array *array_definition =
                container_of(definition, struct definition_array, p);
@@ -64,7 +64,7 @@ int ctf_array_read(struct bt_stream_pos *ppos, struct definition *definition)
        return bt_array_rw(ppos, definition);
 }
 
-int ctf_array_write(struct bt_stream_pos *ppos, struct definition *definition)
+int ctf_array_write(struct bt_stream_pos *ppos, struct bt_definition *definition)
 {
        struct definition_array *array_definition =
                container_of(definition, struct definition_array, p);
index 9371b27735aae6b192555c7bb3c41b6cee0e9999..9461af625479f19c9788dd0d0fc37cdf13295ae7 100644 (file)
@@ -31,7 +31,7 @@
 #include <stdint.h>
 #include <glib.h>
 
-int ctf_enum_read(struct bt_stream_pos *ppos, struct definition *definition)
+int ctf_enum_read(struct bt_stream_pos *ppos, struct bt_definition *definition)
 {
        struct definition_enum *enum_definition =
                container_of(definition, struct definition_enum, p);
@@ -69,7 +69,7 @@ int ctf_enum_read(struct bt_stream_pos *ppos, struct definition *definition)
        return 0;
 }
 
-int ctf_enum_write(struct bt_stream_pos *pos, struct definition *definition)
+int ctf_enum_write(struct bt_stream_pos *pos, struct bt_definition *definition)
 {
        struct definition_enum *enum_definition =
                container_of(definition, struct definition_enum, p);
index f46e26aee2e8dabdbdea6b7d0544ed87ff4d8900..2e0bd5ce57ea78b42994e13b4ddf05e19bc79ae5 100644 (file)
@@ -165,7 +165,7 @@ static int _ctf_float_copy(struct bt_stream_pos *destp,
        return 0;
 }
 
-int ctf_float_read(struct bt_stream_pos *ppos, struct definition *definition)
+int ctf_float_read(struct bt_stream_pos *ppos, struct bt_definition *definition)
 {
        struct definition_float *float_definition =
                container_of(definition, struct definition_float, p);
@@ -173,7 +173,7 @@ int ctf_float_read(struct bt_stream_pos *ppos, struct definition *definition)
                float_definition->declaration;
        struct ctf_stream_pos *pos = ctf_pos(ppos);
        union doubleIEEE754 u;
-       struct definition *tmpdef;
+       struct bt_definition *tmpdef;
        struct definition_float *tmpfloat;
        struct ctf_stream_pos destp;
        struct mmap_align mma;
@@ -222,7 +222,7 @@ end:
        return ret;
 }
 
-int ctf_float_write(struct bt_stream_pos *ppos, struct definition *definition)
+int ctf_float_write(struct bt_stream_pos *ppos, struct bt_definition *definition)
 {
        struct definition_float *float_definition =
                container_of(definition, struct definition_float, p);
@@ -230,7 +230,7 @@ int ctf_float_write(struct bt_stream_pos *ppos, struct definition *definition)
                float_definition->declaration;
        struct ctf_stream_pos *pos = ctf_pos(ppos);
        union doubleIEEE754 u;
-       struct definition *tmpdef;
+       struct bt_definition *tmpdef;
        struct definition_float *tmpfloat;
        struct ctf_stream_pos srcp;
        struct mmap_align mma;
index 1267925d3f9304ac0f7fc94089f63a7de9b0fe41..257341adfa41ce6320a68a00e04cf6bc4d43490f 100644 (file)
@@ -40,7 +40,7 @@
 
 static
 int _aligned_integer_read(struct bt_stream_pos *ppos,
-                         struct definition *definition)
+                         struct bt_definition *definition)
 {
        struct definition_integer *integer_definition =
                container_of(definition, struct definition_integer, p);
@@ -142,7 +142,7 @@ int _aligned_integer_read(struct bt_stream_pos *ppos,
 
 static
 int _aligned_integer_write(struct bt_stream_pos *ppos,
-                           struct definition *definition)
+                           struct bt_definition *definition)
 {
        struct definition_integer *integer_definition =
                container_of(definition, struct definition_integer, p);
@@ -211,7 +211,7 @@ end:
        return 0;
 }
 
-int ctf_integer_read(struct bt_stream_pos *ppos, struct definition *definition)
+int ctf_integer_read(struct bt_stream_pos *ppos, struct bt_definition *definition)
 {
        struct definition_integer *integer_definition =
                container_of(definition, struct definition_integer, p);
@@ -256,7 +256,7 @@ int ctf_integer_read(struct bt_stream_pos *ppos, struct definition *definition)
        return 0;
 }
 
-int ctf_integer_write(struct bt_stream_pos *ppos, struct definition *definition)
+int ctf_integer_write(struct bt_stream_pos *ppos, struct bt_definition *definition)
 {
        struct definition_integer *integer_definition =
                container_of(definition, struct definition_integer, p);
index b2221eaf686a2b731c3c6d95dbb73a49e3dd3a19..53ebf75c30eec90f36d0c677f4ad98b5caa6bbc6 100644 (file)
@@ -28,7 +28,7 @@
 
 #include <babeltrace/ctf/types.h>
 
-int ctf_sequence_read(struct bt_stream_pos *ppos, struct definition *definition)
+int ctf_sequence_read(struct bt_stream_pos *ppos, struct bt_definition *definition)
 {
        struct definition_sequence *sequence_definition =
                container_of(definition, struct definition_sequence, p);
@@ -63,7 +63,7 @@ int ctf_sequence_read(struct bt_stream_pos *ppos, struct definition *definition)
        return bt_sequence_rw(ppos, definition);
 }
 
-int ctf_sequence_write(struct bt_stream_pos *ppos, struct definition *definition)
+int ctf_sequence_write(struct bt_stream_pos *ppos, struct bt_definition *definition)
 {
        struct definition_sequence *sequence_definition =
                container_of(definition, struct definition_sequence, p);
index 5771733b63ba35c42ddb3da3e06a22c5c2baa7f7..a2433bf5922d2013e80f19a1e1897842657de535 100644 (file)
@@ -31,7 +31,7 @@
 #include <limits.h>            /* C99 limits */
 #include <string.h>
 
-int ctf_string_read(struct bt_stream_pos *ppos, struct definition *definition)
+int ctf_string_read(struct bt_stream_pos *ppos, struct bt_definition *definition)
 {
        struct definition_string *string_definition =
                container_of(definition, struct definition_string, p);
@@ -69,7 +69,7 @@ int ctf_string_read(struct bt_stream_pos *ppos, struct definition *definition)
 }
 
 int ctf_string_write(struct bt_stream_pos *ppos,
-                     struct definition *definition)
+                     struct bt_definition *definition)
 {
        struct definition_string *string_definition =
                container_of(definition, struct definition_string, p);
index 7c1562bbf19dc6f43d5933921e12942c91dd415a..b004767e12920c230136514a96f75d1a24b28640 100644 (file)
@@ -28,7 +28,7 @@
 
 #include <babeltrace/ctf/types.h>
 
-int ctf_struct_rw(struct bt_stream_pos *ppos, struct definition *definition)
+int ctf_struct_rw(struct bt_stream_pos *ppos, struct bt_definition *definition)
 {
        struct declaration *declaration = definition->declaration;
        struct ctf_stream_pos *pos = ctf_pos(ppos);
index 3c0c371f4d5922a708e300009fa910be3ab0d96d..ece8b33338dd58f7e38a53a9c5bf6c660d83a190 100644 (file)
@@ -28,7 +28,7 @@
 
 #include <babeltrace/ctf/types.h>
 
-int ctf_variant_rw(struct bt_stream_pos *ppos, struct definition *definition)
+int ctf_variant_rw(struct bt_stream_pos *ppos, struct bt_definition *definition)
 {
        struct declaration *declaration = definition->declaration;
        struct ctf_stream_pos *pos = ctf_pos(ppos);
index 15c833332838eafcbcbaed72806a69733d6424c4..74a68a14487b29e3594c5470542558cd7c7e160f 100644 (file)
@@ -62,21 +62,21 @@ struct ctf_text_stream_pos *ctf_text_pos(struct bt_stream_pos *pos)
  * Write only is supported for now.
  */
 BT_HIDDEN
-int ctf_text_integer_write(struct bt_stream_pos *pos, struct definition *definition);
+int ctf_text_integer_write(struct bt_stream_pos *pos, struct bt_definition *definition);
 BT_HIDDEN
-int ctf_text_float_write(struct bt_stream_pos *pos, struct definition *definition);
+int ctf_text_float_write(struct bt_stream_pos *pos, struct bt_definition *definition);
 BT_HIDDEN
-int ctf_text_string_write(struct bt_stream_pos *pos, struct definition *definition);
+int ctf_text_string_write(struct bt_stream_pos *pos, struct bt_definition *definition);
 BT_HIDDEN
-int ctf_text_enum_write(struct bt_stream_pos *pos, struct definition *definition);
+int ctf_text_enum_write(struct bt_stream_pos *pos, struct bt_definition *definition);
 BT_HIDDEN
-int ctf_text_struct_write(struct bt_stream_pos *pos, struct definition *definition);
+int ctf_text_struct_write(struct bt_stream_pos *pos, struct bt_definition *definition);
 BT_HIDDEN
-int ctf_text_variant_write(struct bt_stream_pos *pos, struct definition *definition);
+int ctf_text_variant_write(struct bt_stream_pos *pos, struct bt_definition *definition);
 BT_HIDDEN
-int ctf_text_array_write(struct bt_stream_pos *pos, struct definition *definition);
+int ctf_text_array_write(struct bt_stream_pos *pos, struct bt_definition *definition);
 BT_HIDDEN
-int ctf_text_sequence_write(struct bt_stream_pos *pos, struct definition *definition);
+int ctf_text_sequence_write(struct bt_stream_pos *pos, struct bt_definition *definition);
 
 static inline
 void print_pos_tabs(struct ctf_text_stream_pos *pos)
@@ -91,6 +91,6 @@ void print_pos_tabs(struct ctf_text_stream_pos *pos)
  * Check if the field must be printed.
  */
 BT_HIDDEN
-int print_field(struct definition *definition);
+int print_field(struct bt_definition *definition);
 
 #endif /* _BABELTRACE_CTF_TEXT_TYPES_H */
index 19d73612b45d78695d5508e5fc6788a855cea3f3..ecc5c28469ae05a59e19cde2b6952487b80cfe24 100644 (file)
@@ -39,7 +39,7 @@
 extern "C" {
 #endif
 
-struct definition;
+struct bt_definition;
 struct declaration;
 struct bt_ctf_event;
 struct bt_ctf_event_decl;
@@ -94,7 +94,7 @@ enum ctf_string_encoding {
  * between the enum and the actual definition of top-level scopes.
  * On error return NULL.
  */
-const struct definition *bt_ctf_get_top_level_scope(const struct bt_ctf_event *event,
+const struct bt_definition *bt_ctf_get_top_level_scope(const struct bt_ctf_event *event,
                enum bt_ctf_scope scope);
 
 /*
@@ -130,35 +130,35 @@ uint64_t bt_ctf_get_timestamp(const struct bt_ctf_event *event);
  * from which the event is extracted is unchanged).
  */
 int bt_ctf_get_field_list(const struct bt_ctf_event *event,
-               const struct definition *scope,
-               struct definition const * const **list,
+               const struct bt_definition *scope,
+               struct bt_definition const * const **list,
                unsigned int *count);
 
 /*
  * bt_ctf_get_field: returns the definition of a specific field
  */
-const struct definition *bt_ctf_get_field(const struct bt_ctf_event *event,
-               const struct definition *scope,
+const struct bt_definition *bt_ctf_get_field(const struct bt_ctf_event *event,
+               const struct bt_definition *scope,
                const char *field);
 
 /*
  * bt_ctf_get_index: if the field is an array or a sequence, return the element
  * at position index, otherwise return NULL;
  */
-const struct definition *bt_ctf_get_index(const struct bt_ctf_event *event,
-               const struct definition *field,
+const struct bt_definition *bt_ctf_get_index(const struct bt_ctf_event *event,
+               const struct bt_definition *field,
                unsigned int index);
 
 /*
  * bt_ctf_field_name: returns the name of a field or NULL on error
  */
-const char *bt_ctf_field_name(const struct definition *def);
+const char *bt_ctf_field_name(const struct bt_definition *def);
 
 /*
  * bt_ctf_get_decl_from_def: return the declaration of a field from
  * its definition or NULL on error
  */
-const struct declaration *bt_ctf_get_decl_from_def(const struct definition *def);
+const struct declaration *bt_ctf_get_decl_from_def(const struct bt_definition *def);
 
 /*
  * bt_ctf_get_decl_from_field_decl: return the declaration of a field from
@@ -225,12 +225,12 @@ int bt_ctf_get_array_len(const struct declaration *decl);
  * bt_ctf_get_enum_str gets the string matching the current enumeration
  * value, or NULL if the current value does not match any string.
  */
-uint64_t bt_ctf_get_uint64(const struct definition *field);
-int64_t bt_ctf_get_int64(const struct definition *field);
-const struct definition *bt_ctf_get_enum_int(const struct definition *field);
-const char *bt_ctf_get_enum_str(const struct definition *field);
-char *bt_ctf_get_char_array(const struct definition *field);
-char *bt_ctf_get_string(const struct definition *field);
+uint64_t bt_ctf_get_uint64(const struct bt_definition *field);
+int64_t bt_ctf_get_int64(const struct bt_definition *field);
+const struct bt_definition *bt_ctf_get_enum_int(const struct bt_definition *field);
+const char *bt_ctf_get_enum_str(const struct bt_definition *field);
+char *bt_ctf_get_char_array(const struct bt_definition *field);
+char *bt_ctf_get_string(const struct bt_definition *field);
 
 /*
  * bt_ctf_field_get_error: returns the last error code encountered while
index f7b93d36907f5a5f25f07e219a8082c9d00e0ca9..781b9429f1cb9d57093abf146863671da1f11dab 100644 (file)
@@ -91,33 +91,33 @@ struct ctf_stream_pos *ctf_pos(struct bt_stream_pos *pos)
 }
 
 BT_HIDDEN
-int ctf_integer_read(struct bt_stream_pos *pos, struct definition *definition);
+int ctf_integer_read(struct bt_stream_pos *pos, struct bt_definition *definition);
 BT_HIDDEN
-int ctf_integer_write(struct bt_stream_pos *pos, struct definition *definition);
+int ctf_integer_write(struct bt_stream_pos *pos, struct bt_definition *definition);
 BT_HIDDEN
-int ctf_float_read(struct bt_stream_pos *pos, struct definition *definition);
+int ctf_float_read(struct bt_stream_pos *pos, struct bt_definition *definition);
 BT_HIDDEN
-int ctf_float_write(struct bt_stream_pos *pos, struct definition *definition);
+int ctf_float_write(struct bt_stream_pos *pos, struct bt_definition *definition);
 BT_HIDDEN
-int ctf_string_read(struct bt_stream_pos *pos, struct definition *definition);
+int ctf_string_read(struct bt_stream_pos *pos, struct bt_definition *definition);
 BT_HIDDEN
-int ctf_string_write(struct bt_stream_pos *pos, struct definition *definition);
+int ctf_string_write(struct bt_stream_pos *pos, struct bt_definition *definition);
 BT_HIDDEN
-int ctf_enum_read(struct bt_stream_pos *pos, struct definition *definition);
+int ctf_enum_read(struct bt_stream_pos *pos, struct bt_definition *definition);
 BT_HIDDEN
-int ctf_enum_write(struct bt_stream_pos *pos, struct definition *definition);
+int ctf_enum_write(struct bt_stream_pos *pos, struct bt_definition *definition);
 BT_HIDDEN
-int ctf_struct_rw(struct bt_stream_pos *pos, struct definition *definition);
+int ctf_struct_rw(struct bt_stream_pos *pos, struct bt_definition *definition);
 BT_HIDDEN
-int ctf_variant_rw(struct bt_stream_pos *pos, struct definition *definition);
+int ctf_variant_rw(struct bt_stream_pos *pos, struct bt_definition *definition);
 BT_HIDDEN
-int ctf_array_read(struct bt_stream_pos *pos, struct definition *definition);
+int ctf_array_read(struct bt_stream_pos *pos, struct bt_definition *definition);
 BT_HIDDEN
-int ctf_array_write(struct bt_stream_pos *pos, struct definition *definition);
+int ctf_array_write(struct bt_stream_pos *pos, struct bt_definition *definition);
 BT_HIDDEN
-int ctf_sequence_read(struct bt_stream_pos *pos, struct definition *definition);
+int ctf_sequence_read(struct bt_stream_pos *pos, struct bt_definition *definition);
 BT_HIDDEN
-int ctf_sequence_write(struct bt_stream_pos *pos, struct definition *definition);
+int ctf_sequence_write(struct bt_stream_pos *pos, struct bt_definition *definition);
 
 void ctf_packet_seek(struct bt_stream_pos *pos, size_t index, int whence);
 
index 093ef0c8f6fee49e0e31565679b1bacad76cde57..0b8d1c1b6037773bdf945545fdd5e6a71deebde0 100644 (file)
@@ -45,7 +45,7 @@
 struct ctf_stream_definition;
 struct bt_stream_pos;
 struct bt_format;
-struct definition;
+struct bt_definition;
 struct ctf_clock;
 
 /* type scope */
@@ -86,7 +86,7 @@ struct declaration {
         * declaration_free called with declaration ref is decremented to 0.
         */
        void (*declaration_free)(struct declaration *declaration);
-       struct definition *
+       struct bt_definition *
                (*definition_new)(struct declaration *declaration,
                                  struct definition_scope *parent_scope,
                                  GQuark field_name, int index,
@@ -94,10 +94,10 @@ struct declaration {
        /*
         * definition_free called with definition ref is decremented to 0.
         */
-       void (*definition_free)(struct definition *definition);
+       void (*definition_free)(struct bt_definition *definition);
 };
 
-struct definition {
+struct bt_definition {
        struct declaration *declaration;
        int index;              /* Position of the definition in its container */
        GQuark name;            /* Field name in its container (or 0 if unset) */
@@ -107,7 +107,7 @@ struct definition {
 };
 
 typedef int (*rw_dispatch)(struct bt_stream_pos *pos,
-                          struct definition *definition);
+                          struct bt_definition *definition);
 
 /* Parent of per-plugin positions */
 struct bt_stream_pos {
@@ -118,7 +118,7 @@ struct bt_stream_pos {
 };
 
 static inline
-int generic_rw(struct bt_stream_pos *pos, struct definition *definition)
+int generic_rw(struct bt_stream_pos *pos, struct bt_definition *definition)
 {
        enum ctf_type_id dispatch_id = definition->declaration->id;
        rw_dispatch call;
@@ -144,7 +144,7 @@ struct declaration_integer {
 };
 
 struct definition_integer {
-       struct definition p;
+       struct bt_definition p;
        struct declaration_integer *declaration;
        /* Last values read */
        union {
@@ -163,7 +163,7 @@ struct declaration_float {
 };
 
 struct definition_float {
-       struct definition p;
+       struct bt_definition p;
        struct declaration_float *declaration;
        struct definition_integer *sign;
        struct definition_integer *mantissa;
@@ -217,7 +217,7 @@ struct declaration_enum {
 };
 
 struct definition_enum {
-       struct definition p;
+       struct bt_definition p;
        struct definition_integer *integer;
        struct declaration_enum *declaration;
        /* Last GQuark values read. Keeping a reference on the GQuark array. */
@@ -230,7 +230,7 @@ struct declaration_string {
 };
 
 struct definition_string {
-       struct definition p;
+       struct bt_definition p;
        struct declaration_string *declaration;
        char *value;    /* freed at definition_string teardown */
        size_t len, alloc_len;
@@ -249,9 +249,9 @@ struct declaration_struct {
 };
 
 struct definition_struct {
-       struct definition p;
+       struct bt_definition p;
        struct declaration_struct *declaration;
-       GPtrArray *fields;              /* Array of pointers to struct definition */
+       GPtrArray *fields;              /* Array of pointers to struct bt_definition */
 };
 
 struct declaration_untagged_variant {
@@ -269,11 +269,11 @@ struct declaration_variant {
 
 /* A variant needs to be tagged to be defined. */
 struct definition_variant {
-       struct definition p;
+       struct bt_definition p;
        struct declaration_variant *declaration;
-       struct definition *enum_tag;
-       GPtrArray *fields;              /* Array of pointers to struct definition */
-       struct definition *current_field;       /* Last field read */
+       struct bt_definition *enum_tag;
+       GPtrArray *fields;              /* Array of pointers to struct bt_definition */
+       struct bt_definition *current_field;    /* Last field read */
 };
 
 struct declaration_array {
@@ -284,9 +284,9 @@ struct declaration_array {
 };
 
 struct definition_array {
-       struct definition p;
+       struct bt_definition p;
        struct declaration_array *declaration;
-       GPtrArray *elems;               /* Array of pointers to struct definition */
+       GPtrArray *elems;               /* Array of pointers to struct bt_definition */
        GString *string;                /* String for encoded integer children */
 };
 
@@ -298,10 +298,10 @@ struct declaration_sequence {
 };
 
 struct definition_sequence {
-       struct definition p;
+       struct bt_definition p;
        struct declaration_sequence *declaration;
        struct definition_integer *length;
-       GPtrArray *elems;               /* Array of pointers to struct definition */
+       GPtrArray *elems;               /* Array of pointers to struct bt_definition */
        GString *string;                /* String for encoded integer children */
 };
 
@@ -343,12 +343,12 @@ void bt_free_declaration_scope(struct declaration_scope *scope);
  * field_definition is for field definitions. They are registered into
  * definition scopes.
  */
-struct definition *
+struct bt_definition *
        bt_lookup_path_definition(GArray *cur_path,     /* array of GQuark */
                               GArray *lookup_path,     /* array of GQuark */
                               struct definition_scope *scope);
 int bt_register_field_definition(GQuark field_name,
-                             struct definition *definition,
+                             struct bt_definition *definition,
                              struct definition_scope *scope);
 struct definition_scope *
        bt_new_definition_scope(struct definition_scope *parent_scope,
@@ -359,7 +359,7 @@ GQuark bt_new_definition_path(struct definition_scope *parent_scope,
                           GQuark field_name, const char *root_name);
 
 static inline
-int compare_definition_path(struct definition *definition, GQuark path)
+int compare_definition_path(struct bt_definition *definition, GQuark path)
 {
        return definition->path == path;
 }
@@ -367,20 +367,20 @@ int compare_definition_path(struct definition *definition, GQuark path)
 void bt_declaration_ref(struct declaration *declaration);
 void bt_declaration_unref(struct declaration *declaration);
 
-void bt_definition_ref(struct definition *definition);
-void bt_definition_unref(struct definition *definition);
+void bt_definition_ref(struct bt_definition *definition);
+void bt_definition_unref(struct bt_definition *definition);
 
 struct declaration_integer *bt_integer_declaration_new(size_t len, int byte_order,
                                  int signedness, size_t alignment,
                                  int base, enum ctf_string_encoding encoding,
                                  struct ctf_clock *clock);
-uint64_t bt_get_unsigned_int(const struct definition *field);
-int64_t bt_get_signed_int(const struct definition *field);
-int bt_get_int_signedness(const struct definition *field);
-int bt_get_int_byte_order(const struct definition *field);
-int bt_get_int_base(const struct definition *field);
-size_t bt_get_int_len(const struct definition *field); /* in bits */
-enum ctf_string_encoding bt_get_int_encoding(const struct definition *field);
+uint64_t bt_get_unsigned_int(const struct bt_definition *field);
+int64_t bt_get_signed_int(const struct bt_definition *field);
+int bt_get_int_signedness(const struct bt_definition *field);
+int bt_get_int_byte_order(const struct bt_definition *field);
+int bt_get_int_base(const struct bt_definition *field);
+size_t bt_get_int_len(const struct bt_definition *field);      /* in bits */
+enum ctf_string_encoding bt_get_int_encoding(const struct bt_definition *field);
 
 /*
  * mantissa_len is the length of the number of bytes represented by the mantissa
@@ -427,8 +427,8 @@ struct declaration_enum *
 
 struct declaration_string *
        bt_string_declaration_new(enum ctf_string_encoding encoding);
-char *bt_get_string(const struct definition *field);
-enum ctf_string_encoding bt_get_string_encoding(const struct definition *field);
+char *bt_get_string(const struct bt_definition *field);
+enum ctf_string_encoding bt_get_string_encoding(const struct bt_definition *field);
 
 struct declaration_struct *
        bt_struct_declaration_new(struct declaration_scope *parent_scope,
@@ -447,10 +447,10 @@ int bt_struct_declaration_lookup_field_index(struct declaration_struct *struct_d
 struct declaration_field *
 bt_struct_declaration_get_field_from_index(struct declaration_struct *struct_declaration,
                                        int index);
-struct definition *
+struct bt_definition *
 bt_struct_definition_get_field_from_index(struct definition_struct *struct_definition,
                                       int index);
-int bt_struct_rw(struct bt_stream_pos *pos, struct definition *definition);
+int bt_struct_rw(struct bt_stream_pos *pos, struct bt_definition *definition);
 uint64_t bt_struct_declaration_len(struct declaration_struct *struct_declaration);
 
 /*
@@ -473,14 +473,14 @@ struct declaration_field *
  * Returns 0 on success, -EPERM on error.
  */
 int variant_definition_set_tag(struct definition_variant *variant,
-                              struct definition *enum_tag);
+                              struct bt_definition *enum_tag);
 /*
  * Returns the field selected by the current tag value.
  * field returned only valid as long as the variant structure is not appended
  * to.
  */
-struct definition *bt_variant_get_current_field(struct definition_variant *variant);
-int bt_variant_rw(struct bt_stream_pos *pos, struct definition *definition);
+struct bt_definition *bt_variant_get_current_field(struct definition_variant *variant);
+int bt_variant_rw(struct bt_stream_pos *pos, struct bt_definition *definition);
 
 /*
  * elem_declaration passed as parameter now belongs to the array. No
@@ -491,10 +491,10 @@ struct declaration_array *
        bt_array_declaration_new(size_t len, struct declaration *elem_declaration,
                struct declaration_scope *parent_scope);
 uint64_t bt_array_len(struct definition_array *array);
-struct definition *bt_array_index(struct definition_array *array, uint64_t i);
-int bt_array_rw(struct bt_stream_pos *pos, struct definition *definition);
-GString *bt_get_char_array(const struct definition *field);
-int bt_get_array_len(const struct definition *field);
+struct bt_definition *bt_array_index(struct definition_array *array, uint64_t i);
+int bt_array_rw(struct bt_stream_pos *pos, struct bt_definition *definition);
+GString *bt_get_char_array(const struct bt_definition *field);
+int bt_get_array_len(const struct bt_definition *field);
 
 /*
  * int_declaration and elem_declaration passed as parameter now belong
@@ -505,8 +505,8 @@ struct declaration_sequence *
                struct declaration *elem_declaration,
                struct declaration_scope *parent_scope);
 uint64_t bt_sequence_len(struct definition_sequence *sequence);
-struct definition *bt_sequence_index(struct definition_sequence *sequence, uint64_t i);
-int bt_sequence_rw(struct bt_stream_pos *pos, struct definition *definition);
+struct bt_definition *bt_sequence_index(struct definition_sequence *sequence, uint64_t i);
+int bt_sequence_rw(struct bt_stream_pos *pos, struct bt_definition *definition);
 
 /*
  * in: path (dot separated), out: q (GArray of GQuark)
@@ -516,15 +516,15 @@ void bt_append_scope_path(const char *path, GArray *q);
 /*
  * Lookup helpers.
  */
-struct definition *bt_lookup_definition(const struct definition *definition,
+struct bt_definition *bt_lookup_definition(const struct bt_definition *definition,
                                     const char *field_name);
-struct definition_integer *bt_lookup_integer(const struct definition *definition,
+struct definition_integer *bt_lookup_integer(const struct bt_definition *definition,
                                          const char *field_name,
                                          int signedness);
-struct definition_enum *bt_lookup_enum(const struct definition *definition,
+struct definition_enum *bt_lookup_enum(const struct bt_definition *definition,
                                    const char *field_name,
                                    int signedness);
-struct definition *bt_lookup_variant(const struct definition *definition,
+struct bt_definition *bt_lookup_variant(const struct bt_definition *definition,
                                  const char *field_name);
 
 static inline
index 43decb50574bb190f3521d0a7f698427a453730d..debc15aa9788d093b83a1d77a0bf0b92e246d082 100644 (file)
 #include <inttypes.h>
 
 static
-struct definition *_array_definition_new(struct declaration *declaration,
+struct bt_definition *_array_definition_new(struct declaration *declaration,
                        struct definition_scope *parent_scope,
                        GQuark field_name, int index, const char *root_name);
 static
-void _array_definition_free(struct definition *definition);
+void _array_definition_free(struct bt_definition *definition);
 
-int bt_array_rw(struct bt_stream_pos *pos, struct definition *definition)
+int bt_array_rw(struct bt_stream_pos *pos, struct bt_definition *definition)
 {
        struct definition_array *array_definition =
                container_of(definition, struct definition_array, p);
@@ -49,7 +49,7 @@ int bt_array_rw(struct bt_stream_pos *pos, struct definition *definition)
 
        /* No need to align, because the first field will align itself. */
        for (i = 0; i < array_declaration->len; i++) {
-               struct definition *field =
+               struct bt_definition *field =
                        g_ptr_array_index(array_definition->elems, i);
                ret = generic_rw(pos, field);
                if (ret)
@@ -93,7 +93,7 @@ struct declaration_array *
 }
 
 static
-struct definition *
+struct bt_definition *
        _array_definition_new(struct declaration *declaration,
                              struct definition_scope *parent_scope,
                              GQuark field_name, int index, const char *root_name)
@@ -142,7 +142,7 @@ struct definition *
        array->elems = g_ptr_array_sized_new(array_declaration->len);
        g_ptr_array_set_size(array->elems, array_declaration->len);
        for (i = 0; i < array_declaration->len; i++) {
-               struct definition **field;
+               struct bt_definition **field;
                GString *str;
                GQuark name;
 
@@ -151,7 +151,7 @@ struct definition *
                name = g_quark_from_string(str->str);
                (void) g_string_free(str, TRUE);
 
-               field = (struct definition **) &g_ptr_array_index(array->elems, i);
+               field = (struct bt_definition **) &g_ptr_array_index(array->elems, i);
                *field = array_declaration->elem->definition_new(array_declaration->elem,
                                          array->p.scope,
                                          name, i, NULL);
@@ -163,7 +163,7 @@ struct definition *
 
 error:
        for (i--; i >= 0; i--) {
-               struct definition *field;
+               struct bt_definition *field;
 
                field = g_ptr_array_index(array->elems, i);
                field->declaration->definition_free(field);
@@ -176,7 +176,7 @@ error:
 }
 
 static
-void _array_definition_free(struct definition *definition)
+void _array_definition_free(struct bt_definition *definition)
 {
        struct definition_array *array =
                container_of(definition, struct definition_array, p);
@@ -186,7 +186,7 @@ void _array_definition_free(struct definition *definition)
                (void) g_string_free(array->string, TRUE);
        if (array->elems) {
                for (i = 0; i < array->elems->len; i++) {
-                       struct definition *field;
+                       struct bt_definition *field;
 
                        field = g_ptr_array_index(array->elems, i);
                        field->declaration->definition_free(field);
@@ -205,7 +205,7 @@ uint64_t bt_array_len(struct definition_array *array)
        return array->elems->len;
 }
 
-struct definition *bt_array_index(struct definition_array *array, uint64_t i)
+struct bt_definition *bt_array_index(struct definition_array *array, uint64_t i)
 {
        if (!array->elems)
                return NULL;
@@ -214,7 +214,7 @@ struct definition *bt_array_index(struct definition_array *array, uint64_t i)
        return g_ptr_array_index(array->elems, i);
 }
 
-int bt_get_array_len(const struct definition *field)
+int bt_get_array_len(const struct bt_definition *field)
 {
        struct definition_array *array_definition;
        struct declaration_array *array_declaration;
@@ -225,7 +225,7 @@ int bt_get_array_len(const struct definition *field)
        return array_declaration->len;
 }
 
-GString *bt_get_char_array(const struct definition *field)
+GString *bt_get_char_array(const struct bt_definition *field)
 {
        struct definition_array *array_definition;
        struct declaration_array *array_declaration;
index 2c0cfe866f9f8f3f9f5d2fa7d2df419c95e3ff27..e967e14d17da58dc8b68b0250622c2cf245ac21d 100644 (file)
 #endif
 
 static
-struct definition *_enum_definition_new(struct declaration *declaration,
+struct bt_definition *_enum_definition_new(struct declaration *declaration,
                                        struct definition_scope *parent_scope,
                                        GQuark field_name, int index,
                                        const char *root_name);
 static
-void _enum_definition_free(struct definition *definition);
+void _enum_definition_free(struct bt_definition *definition);
 
 static
 void enum_range_set_free(void *ptr)
@@ -417,7 +417,7 @@ struct declaration_enum *
 }
 
 static
-struct definition *
+struct bt_definition *
        _enum_definition_new(struct declaration *declaration,
                             struct definition_scope *parent_scope,
                             GQuark field_name, int index,
@@ -426,7 +426,7 @@ struct definition *
        struct declaration_enum *enum_declaration =
                container_of(declaration, struct declaration_enum, p);
        struct definition_enum *_enum;
-       struct definition *definition_integer_parent;
+       struct bt_definition *definition_integer_parent;
        int ret;
 
        _enum = g_new(struct definition_enum, 1);
@@ -456,7 +456,7 @@ struct definition *
 }
 
 static
-void _enum_definition_free(struct definition *definition)
+void _enum_definition_free(struct bt_definition *definition)
 {
        struct definition_enum *_enum =
                container_of(definition, struct definition_enum, p);
index 16d435200a15d6a5efccdf1ca21de9426af377fb..7aeb9c3aacb5a0b7d6d0c36055e9d7575f58eb82 100644 (file)
 #include <babeltrace/endian.h>
 
 static
-struct definition *_float_definition_new(struct declaration *declaration,
+struct bt_definition *_float_definition_new(struct declaration *declaration,
                                   struct definition_scope *parent_scope,
                                   GQuark field_name, int index,
                                   const char *root_name);
 static
-void _float_definition_free(struct definition *definition);
+void _float_definition_free(struct bt_definition *definition);
 
 static
 void _float_declaration_free(struct declaration *declaration)
@@ -81,7 +81,7 @@ struct declaration_float *
 }
 
 static
-struct definition *
+struct bt_definition *
        _float_definition_new(struct declaration *declaration,
                              struct definition_scope *parent_scope,
                              GQuark field_name, int index,
@@ -90,7 +90,7 @@ struct definition *
        struct declaration_float *float_declaration =
                container_of(declaration, struct declaration_float, p);
        struct definition_float *_float;
-       struct definition *tmp;
+       struct bt_definition *tmp;
 
        _float = g_new(struct definition_float, 1);
        bt_declaration_ref(&float_declaration->p);
@@ -138,7 +138,7 @@ struct definition *
 }
 
 static
-void _float_definition_free(struct definition *definition)
+void _float_definition_free(struct bt_definition *definition)
 {
        struct definition_float *_float =
                container_of(definition, struct definition_float, p);
index 47f23eb5e7fb43cc3d84ecfb68daba3e15c137af..92c7eb11813026256f7646bfc8a996421c28f902 100644 (file)
 #include <stdint.h>
 
 static
-struct definition *_integer_definition_new(struct declaration *declaration,
+struct bt_definition *_integer_definition_new(struct declaration *declaration,
                               struct definition_scope *parent_scope,
                               GQuark field_name, int index,
                               const char *root_name);
 static
-void _integer_definition_free(struct definition *definition);
+void _integer_definition_free(struct bt_definition *definition);
 
 static
 void _integer_declaration_free(struct declaration *declaration)
@@ -73,7 +73,7 @@ struct declaration_integer *
 }
 
 static
-struct definition *
+struct bt_definition *
        _integer_definition_new(struct declaration *declaration,
                                struct definition_scope *parent_scope,
                                GQuark field_name, int index,
@@ -106,7 +106,7 @@ struct definition *
 }
 
 static
-void _integer_definition_free(struct definition *definition)
+void _integer_definition_free(struct bt_definition *definition)
 {
        struct definition_integer *integer =
                container_of(definition, struct definition_integer, p);
@@ -115,7 +115,7 @@ void _integer_definition_free(struct definition *definition)
        g_free(integer);
 }
 
-enum ctf_string_encoding bt_get_int_encoding(const struct definition *field)
+enum ctf_string_encoding bt_get_int_encoding(const struct bt_definition *field)
 {
        struct definition_integer *integer_definition;
        const struct declaration_integer *integer_declaration;
@@ -126,7 +126,7 @@ enum ctf_string_encoding bt_get_int_encoding(const struct definition *field)
        return integer_declaration->encoding;
 }
 
-int bt_get_int_base(const struct definition *field)
+int bt_get_int_base(const struct bt_definition *field)
 {
        struct definition_integer *integer_definition;
        const struct declaration_integer *integer_declaration;
@@ -137,7 +137,7 @@ int bt_get_int_base(const struct definition *field)
        return integer_declaration->base;
 }
 
-size_t bt_get_int_len(const struct definition *field)
+size_t bt_get_int_len(const struct bt_definition *field)
 {
        struct definition_integer *integer_definition;
        const struct declaration_integer *integer_declaration;
@@ -148,7 +148,7 @@ size_t bt_get_int_len(const struct definition *field)
        return integer_declaration->len;
 }
 
-int bt_get_int_byte_order(const struct definition *field)
+int bt_get_int_byte_order(const struct bt_definition *field)
 {
        struct definition_integer *integer_definition;
        const struct declaration_integer *integer_declaration;
@@ -159,7 +159,7 @@ int bt_get_int_byte_order(const struct definition *field)
        return integer_declaration->byte_order;
 }
 
-int bt_get_int_signedness(const struct definition *field)
+int bt_get_int_signedness(const struct bt_definition *field)
 {
        struct definition_integer *integer_definition;
        const struct declaration_integer *integer_declaration;
@@ -170,7 +170,7 @@ int bt_get_int_signedness(const struct definition *field)
        return integer_declaration->signedness;
 }
 
-uint64_t bt_get_unsigned_int(const struct definition *field)
+uint64_t bt_get_unsigned_int(const struct bt_definition *field)
 {
        struct definition_integer *integer_definition;
        const struct declaration_integer *integer_declaration;
@@ -186,7 +186,7 @@ uint64_t bt_get_unsigned_int(const struct definition *field)
        return (uint64_t)integer_definition->value._signed;
 }
 
-int64_t bt_get_signed_int(const struct definition *field)
+int64_t bt_get_signed_int(const struct bt_definition *field)
 {
        struct definition_integer *integer_definition;
        const struct declaration_integer *integer_declaration;
index a91a2494c8a01f8791786ee8bec4fbd8f75c558a..8792325e834427f5855c61651f9de0f33e73bf09 100644 (file)
 #include <inttypes.h>
 
 static
-struct definition *_sequence_definition_new(struct declaration *declaration,
+struct bt_definition *_sequence_definition_new(struct declaration *declaration,
                                        struct definition_scope *parent_scope,
                                        GQuark field_name, int index,
                                        const char *root_name);
 static
-void _sequence_definition_free(struct definition *definition);
+void _sequence_definition_free(struct bt_definition *definition);
 
-int bt_sequence_rw(struct bt_stream_pos *pos, struct definition *definition)
+int bt_sequence_rw(struct bt_stream_pos *pos, struct bt_definition *definition)
 {
        struct definition_sequence *sequence_definition =
                container_of(definition, struct definition_sequence, p);
@@ -62,7 +62,7 @@ int bt_sequence_rw(struct bt_stream_pos *pos, struct definition *definition)
                g_ptr_array_set_size(sequence_definition->elems, len);
 
        for (i = oldlen; i < len; i++) {
-               struct definition **field;
+               struct bt_definition **field;
                GString *str;
                GQuark name;
 
@@ -71,15 +71,15 @@ int bt_sequence_rw(struct bt_stream_pos *pos, struct definition *definition)
                name = g_quark_from_string(str->str);
                (void) g_string_free(str, TRUE);
 
-               field = (struct definition **) &g_ptr_array_index(sequence_definition->elems, i);
+               field = (struct bt_definition **) &g_ptr_array_index(sequence_definition->elems, i);
                *field = sequence_declaration->elem->definition_new(sequence_declaration->elem,
                                          sequence_definition->p.scope,
                                          name, i, NULL);
        }
        for (i = 0; i < len; i++) {
-               struct definition **field;
+               struct bt_definition **field;
 
-               field = (struct definition **) &g_ptr_array_index(sequence_definition->elems, i);
+               field = (struct bt_definition **) &g_ptr_array_index(sequence_definition->elems, i);
                ret = generic_rw(pos, *field);
                if (ret)
                        return ret;
@@ -126,7 +126,7 @@ struct declaration_sequence *
 }
 
 static
-struct definition *_sequence_definition_new(struct declaration *declaration,
+struct bt_definition *_sequence_definition_new(struct declaration *declaration,
                                struct definition_scope *parent_scope,
                                GQuark field_name, int index,
                                const char *root_name)
@@ -134,7 +134,7 @@ struct definition *_sequence_definition_new(struct declaration *declaration,
        struct declaration_sequence *sequence_declaration =
                container_of(declaration, struct declaration_sequence, p);
        struct definition_sequence *sequence;
-       struct definition *len_parent;
+       struct bt_definition *len_parent;
        int ret;
 
        sequence = g_new(struct definition_sequence, 1);
@@ -198,18 +198,18 @@ error:
 }
 
 static
-void _sequence_definition_free(struct definition *definition)
+void _sequence_definition_free(struct bt_definition *definition)
 {
        struct definition_sequence *sequence =
                container_of(definition, struct definition_sequence, p);
-       struct definition *len_definition = &sequence->length->p;
+       struct bt_definition *len_definition = &sequence->length->p;
        uint64_t i;
 
        if (sequence->string)
                (void) g_string_free(sequence->string, TRUE);
        if (sequence->elems) {
                for (i = 0; i < sequence->elems->len; i++) {
-                       struct definition *field;
+                       struct bt_definition *field;
 
                        field = g_ptr_array_index(sequence->elems, i);
                        field->declaration->definition_free(field);
@@ -227,7 +227,7 @@ uint64_t bt_sequence_len(struct definition_sequence *sequence)
        return sequence->length->value._unsigned;
 }
 
-struct definition *bt_sequence_index(struct definition_sequence *sequence, uint64_t i)
+struct bt_definition *bt_sequence_index(struct definition_sequence *sequence, uint64_t i)
 {
        if (!sequence->elems)
                return NULL;
index dff27ee82cf28377340ab39ebff33ac36202a234..5db17164630c5067a5ec1ace2ce7fefd36581fd6 100644 (file)
 #include <babeltrace/types.h>
 
 static
-struct definition *_string_definition_new(struct declaration *declaration,
+struct bt_definition *_string_definition_new(struct declaration *declaration,
                                struct definition_scope *parent_scope,
                                GQuark field_name, int index,
                                const char *root_name);
 static
-void _string_definition_free(struct definition *definition);
+void _string_definition_free(struct bt_definition *definition);
 
 static
 void _string_declaration_free(struct declaration *declaration)
@@ -64,7 +64,7 @@ struct declaration_string *
 }
 
 static
-struct definition *
+struct bt_definition *
        _string_definition_new(struct declaration *declaration,
                               struct definition_scope *parent_scope,
                               GQuark field_name, int index,
@@ -99,7 +99,7 @@ struct definition *
 }
 
 static
-void _string_definition_free(struct definition *definition)
+void _string_definition_free(struct bt_definition *definition)
 {
        struct definition_string *string =
                container_of(definition, struct definition_string, p);
@@ -109,7 +109,7 @@ void _string_definition_free(struct definition *definition)
        g_free(string);
 }
 
-enum ctf_string_encoding bt_get_string_encoding(const struct definition *field)
+enum ctf_string_encoding bt_get_string_encoding(const struct bt_definition *field)
 {
        struct definition_string *string_definition;
        const struct declaration_string *string_declaration;
@@ -120,7 +120,7 @@ enum ctf_string_encoding bt_get_string_encoding(const struct definition *field)
        return string_declaration->encoding;
 }
 
-char *bt_get_string(const struct definition *field)
+char *bt_get_string(const struct bt_definition *field)
 {
        struct definition_string *string_definition =
                container_of(field, struct definition_string, p);
index 219d523078fa26aa6a2a9df27c761b4824214adc..fadc1877043cc5378e93c61db08b3f52ea10fbf7 100644 (file)
 #endif
 
 static
-struct definition *_struct_definition_new(struct declaration *declaration,
+struct bt_definition *_struct_definition_new(struct declaration *declaration,
                                struct definition_scope *parent_scope,
                                GQuark field_name, int index,
                                const char *root_name);
 static
-void _struct_definition_free(struct definition *definition);
+void _struct_definition_free(struct bt_definition *definition);
 
-int bt_struct_rw(struct bt_stream_pos *ppos, struct definition *definition)
+int bt_struct_rw(struct bt_stream_pos *ppos, struct bt_definition *definition)
 {
        struct definition_struct *struct_definition =
                container_of(definition, struct definition_struct, p);
@@ -51,7 +51,7 @@ int bt_struct_rw(struct bt_stream_pos *ppos, struct definition *definition)
        int ret;
 
        for (i = 0; i < struct_definition->fields->len; i++) {
-               struct definition *field =
+               struct bt_definition *field =
                        g_ptr_array_index(struct_definition->fields, i);
                ret = generic_rw(ppos, field);
                if (ret)
@@ -105,7 +105,7 @@ struct declaration_struct *
 }
 
 static
-struct definition *
+struct bt_definition *
        _struct_definition_new(struct declaration *declaration,
                               struct definition_scope *parent_scope,
                               GQuark field_name, int index,
@@ -141,8 +141,8 @@ struct definition *
                struct declaration_field *declaration_field =
                        &g_array_index(struct_declaration->fields,
                                       struct declaration_field, i);
-               struct definition **field =
-                       (struct definition **) &g_ptr_array_index(_struct->fields, i);
+               struct bt_definition **field =
+                       (struct bt_definition **) &g_ptr_array_index(_struct->fields, i);
 
                *field = declaration_field->declaration->definition_new(declaration_field->declaration,
                                                          _struct->p.scope,
@@ -154,7 +154,7 @@ struct definition *
 
 error:
        for (i--; i >= 0; i--) {
-               struct definition *field = g_ptr_array_index(_struct->fields, i);
+               struct bt_definition *field = g_ptr_array_index(_struct->fields, i);
                bt_definition_unref(field);
        }
        bt_free_definition_scope(_struct->p.scope);
@@ -164,7 +164,7 @@ error:
 }
 
 static
-void _struct_definition_free(struct definition *definition)
+void _struct_definition_free(struct bt_definition *definition)
 {
        struct definition_struct *_struct =
                container_of(definition, struct definition_struct, p);
@@ -172,7 +172,7 @@ void _struct_definition_free(struct definition *definition)
 
        assert(_struct->fields->len == _struct->declaration->fields->len);
        for (i = 0; i < _struct->fields->len; i++) {
-               struct definition *field = g_ptr_array_index(_struct->fields, i);
+               struct bt_definition *field = g_ptr_array_index(_struct->fields, i);
                bt_definition_unref(field);
        }
        bt_free_definition_scope(_struct->p.scope);
@@ -241,7 +241,7 @@ struct declaration_field *
 /*
  * field returned only valid as long as the field structure is not appended to.
  */
-struct definition *
+struct bt_definition *
 bt_struct_definition_get_field_from_index(struct definition_struct *_struct,
                                        int index)
 {
index 3e20dfe1fbc67f094b1f72658769278894b03789..b235c13ae51bc254c9d1210676a4761917622a07 100644 (file)
@@ -92,7 +92,7 @@ int bt_register_declaration(GQuark name, struct declaration *declaration,
 }
 
 static
-struct definition *
+struct bt_definition *
        lookup_field_definition_scope(GQuark field_name,
                struct definition_scope *scope)
 {
@@ -158,7 +158,7 @@ end:
 }
 
 static struct definition_scope *
-       get_definition_scope(const struct definition *definition)
+       get_definition_scope(const struct bt_definition *definition)
 {
        return definition->scope;
 }
@@ -183,12 +183,12 @@ static struct definition_scope *
  * lookup_path: the path leading to the enum we want to look for.
  * scope: the definition scope containing the variant definition.
  */
-struct definition *
+struct bt_definition *
        bt_lookup_path_definition(GArray *cur_path,
                               GArray *lookup_path,
                               struct definition_scope *scope)
 {
-       struct definition *definition, *lookup_definition;
+       struct bt_definition *definition, *lookup_definition;
        GQuark last;
        int index;
 
@@ -262,7 +262,7 @@ lookup:
        return NULL;
 }
 
-int bt_register_field_definition(GQuark field_name, struct definition *definition,
+int bt_register_field_definition(GQuark field_name, struct bt_definition *definition,
                struct definition_scope *scope)
 {
        if (!scope || !field_name)
@@ -292,12 +292,12 @@ void bt_declaration_unref(struct declaration *declaration)
                declaration->declaration_free(declaration);
 }
 
-void bt_definition_ref(struct definition *definition)
+void bt_definition_ref(struct bt_definition *definition)
 {
        definition->ref++;
 }
 
-void bt_definition_unref(struct definition *definition)
+void bt_definition_unref(struct bt_definition *definition)
 {
        if (!definition)
                return;
@@ -612,7 +612,7 @@ void bt_free_definition_scope(struct definition_scope *scope)
        g_free(scope);
 }
 
-struct definition *bt_lookup_definition(const struct definition *definition,
+struct bt_definition *bt_lookup_definition(const struct bt_definition *definition,
                                     const char *field_name)
 {
        struct definition_scope *scope = get_definition_scope(definition);
@@ -624,11 +624,11 @@ struct definition *bt_lookup_definition(const struct definition *definition,
                                             scope);
 }
 
-struct definition_integer *bt_lookup_integer(const struct definition *definition,
+struct definition_integer *bt_lookup_integer(const struct bt_definition *definition,
                                          const char *field_name,
                                          int signedness)
 {
-       struct definition *lookup;
+       struct bt_definition *lookup;
        struct definition_integer *lookup_integer;
 
        lookup = bt_lookup_definition(definition, field_name);
@@ -642,11 +642,11 @@ struct definition_integer *bt_lookup_integer(const struct definition *definition
        return lookup_integer;
 }
 
-struct definition_enum *bt_lookup_enum(const struct definition *definition,
+struct definition_enum *bt_lookup_enum(const struct bt_definition *definition,
                                    const char *field_name,
                                    int signedness)
 {
-       struct definition *lookup;
+       struct bt_definition *lookup;
        struct definition_enum *lookup_enum;
 
        lookup = bt_lookup_definition(definition, field_name);
@@ -660,10 +660,10 @@ struct definition_enum *bt_lookup_enum(const struct definition *definition,
        return lookup_enum;
 }
 
-struct definition *bt_lookup_variant(const struct definition *definition,
+struct bt_definition *bt_lookup_variant(const struct bt_definition *definition,
                                  const char *field_name)
 {
-       struct definition *lookup;
+       struct bt_definition *lookup;
        struct definition_variant *bt_lookup_variant;
 
        lookup = bt_lookup_definition(definition, field_name);
index 4db0de9b4c9f9546f2d4ac7ecb10e68fadbb7bc6..ed2955031786ad3087cdf10fe9f572f404908b31 100644 (file)
 #include <errno.h>
 
 static
-struct definition *_variant_definition_new(struct declaration *declaration,
+struct bt_definition *_variant_definition_new(struct declaration *declaration,
                                struct definition_scope *parent_scope,
                                GQuark field_name, int index,
                                const char *root_name);
 static
-void _variant_definition_free(struct definition *definition);
+void _variant_definition_free(struct bt_definition *definition);
 
-int bt_variant_rw(struct bt_stream_pos *ppos, struct definition *definition)
+int bt_variant_rw(struct bt_stream_pos *ppos, struct bt_definition *definition)
 {
        struct definition_variant *variant_definition =
                container_of(definition, struct definition_variant, p);
-       struct definition *field;
+       struct bt_definition *field;
 
        field = bt_variant_get_current_field(variant_definition);
        return generic_rw(ppos, field);
@@ -130,7 +130,7 @@ struct declaration_variant *
  */
 static
 int check_enum_tag(struct definition_variant *variant,
-                  struct definition *enum_tag)
+                  struct bt_definition *enum_tag)
 {
        struct definition_enum *_enum =
                container_of(enum_tag, struct definition_enum, p);
@@ -172,7 +172,7 @@ int check_enum_tag(struct definition_variant *variant,
 
 
 static
-struct definition *
+struct bt_definition *
        _variant_definition_new(struct declaration *declaration,
                                struct definition_scope *parent_scope,
                                GQuark field_name, int index,
@@ -216,8 +216,8 @@ struct definition *
                struct declaration_field *declaration_field =
                        &g_array_index(variant_declaration->untagged_variant->fields,
                                       struct declaration_field, i);
-               struct definition **field =
-                       (struct definition **) &g_ptr_array_index(variant->fields, i);
+               struct bt_definition **field =
+                       (struct bt_definition **) &g_ptr_array_index(variant->fields, i);
 
                /*
                 * All child definition are at index 0, because they are
@@ -239,7 +239,7 @@ error:
 }
 
 static
-void _variant_definition_free(struct definition *definition)
+void _variant_definition_free(struct bt_definition *definition)
 {
        struct definition_variant *variant =
                container_of(definition, struct definition_variant, p);
@@ -247,7 +247,7 @@ void _variant_definition_free(struct definition *definition)
 
        assert(variant->fields->len == variant->declaration->untagged_variant->fields->len);
        for (i = 0; i < variant->fields->len; i++) {
-               struct definition *field = g_ptr_array_index(variant->fields, i);
+               struct bt_definition *field = g_ptr_array_index(variant->fields, i);
                bt_definition_unref(field);
        }
        bt_definition_unref(variant->enum_tag);
@@ -301,7 +301,7 @@ bt_untagged_variant_declaration_get_field_from_tag(struct declaration_untagged_v
 /*
  * field returned only valid as long as the field structure is not appended to.
  */
-struct definition *bt_variant_get_current_field(struct definition_variant *variant)
+struct bt_definition *bt_variant_get_current_field(struct definition_variant *variant)
 {
        struct definition_enum *_enum =
                container_of(variant->enum_tag, struct definition_enum, p);
This page took 0.060225 seconds and 4 git commands to generate.