Namespace the struct declaration
authorJulien Desfossez <jdesfossez@efficios.com>
Fri, 15 Feb 2013 19:26:54 +0000 (14:26 -0500)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Fri, 15 Feb 2013 19:26:54 +0000 (14:26 -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>
20 files changed:
formats/ctf-text/types/array.c
formats/ctf-text/types/sequence.c
formats/ctf-text/types/struct.c
formats/ctf/events.c
formats/ctf/metadata/ctf-visitor-generate-io-struct.c
formats/ctf/types/array.c
formats/ctf/types/sequence.c
formats/ctf/types/struct.c
formats/ctf/types/variant.c
include/babeltrace/ctf/events.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 d9f57a2f7133965370dd78d8fedd7d107e1e77ed..47eb1287a0f15dbac4604bc5bf5ecf21113839b1 100644 (file)
@@ -36,7 +36,7 @@ int ctf_text_array_write(struct bt_stream_pos *ppos, struct bt_definition *defin
                container_of(definition, struct definition_array, p);
        struct declaration_array *array_declaration =
                array_definition->declaration;
                container_of(definition, struct definition_array, p);
        struct declaration_array *array_declaration =
                array_definition->declaration;
-       struct declaration *elem = array_declaration->elem;
+       struct bt_declaration *elem = array_declaration->elem;
        int field_nr_saved;
        int ret = 0;
 
        int field_nr_saved;
        int ret = 0;
 
index 706fe5e908279bd47a7d2eb22c3b5903c87f1379..a9499b451ced7b3580d56899fed05a82508dc022 100644 (file)
@@ -36,7 +36,7 @@ int ctf_text_sequence_write(struct bt_stream_pos *ppos, struct bt_definition *de
                container_of(definition, struct definition_sequence, p);
        struct declaration_sequence *sequence_declaration =
                sequence_definition->declaration;
                container_of(definition, struct definition_sequence, p);
        struct declaration_sequence *sequence_declaration =
                sequence_definition->declaration;
-       struct declaration *elem = sequence_declaration->elem;
+       struct bt_declaration *elem = sequence_declaration->elem;
        int field_nr_saved;
        int ret = 0;
 
        int field_nr_saved;
        int ret = 0;
 
index 1b9e27e10ce948a66c15b39640146c6ec87c9364..cbfcc7cde2b00ea2a6b6686ad51ada158f56fb33 100644 (file)
@@ -31,7 +31,7 @@
 
 int ctf_text_struct_write(struct bt_stream_pos *ppos, struct bt_definition *definition)
 {
 
 int ctf_text_struct_write(struct bt_stream_pos *ppos, struct bt_definition *definition)
 {
-       struct declaration *declaration = definition->declaration;
+       struct bt_declaration *declaration = definition->declaration;
        struct declaration_struct *struct_declaration =
                container_of(declaration, struct declaration_struct, p);
        struct ctf_text_stream_pos *pos = ctf_text_pos(ppos);
        struct declaration_struct *struct_declaration =
                container_of(declaration, struct declaration_struct, p);
        struct ctf_text_stream_pos *pos = ctf_text_pos(ppos);
index af7f5e15cd07a42d116f8be1e669cdd2c8b11a5f..3cf3b88f710234c851f5bf8ece79c2ab10fff594 100644 (file)
@@ -174,7 +174,7 @@ const char *bt_ctf_field_name(const struct bt_definition *def)
        return rem_(g_quark_to_string(def->name));
 }
 
        return rem_(g_quark_to_string(def->name));
 }
 
-enum ctf_type_id bt_ctf_field_type(const struct declaration *decl)
+enum ctf_type_id bt_ctf_field_type(const struct bt_declaration *decl)
 {
        if (!decl)
                return CTF_TYPE_UNKNOWN;
 {
        if (!decl)
                return CTF_TYPE_UNKNOWN;
@@ -358,7 +358,7 @@ int bt_ctf_field_get_error(void)
 }
 
 static const struct declaration_integer *
 }
 
 static const struct declaration_integer *
-get_declaration_integer(const struct declaration *decl)
+get_declaration_integer(const struct bt_declaration *decl)
 {
        if (!decl || bt_ctf_field_type(decl) != CTF_TYPE_INTEGER)
                return NULL;
 {
        if (!decl || bt_ctf_field_type(decl) != CTF_TYPE_INTEGER)
                return NULL;
@@ -366,7 +366,7 @@ get_declaration_integer(const struct declaration *decl)
 }
 
 static const struct declaration_string *
 }
 
 static const struct declaration_string *
-get_declaration_string(const struct declaration *decl)
+get_declaration_string(const struct bt_declaration *decl)
 {
        if (!decl || bt_ctf_field_type(decl) != CTF_TYPE_STRING)
                return NULL;
 {
        if (!decl || bt_ctf_field_type(decl) != CTF_TYPE_STRING)
                return NULL;
@@ -374,7 +374,7 @@ get_declaration_string(const struct declaration *decl)
 }
 
 static const struct declaration_array *
 }
 
 static const struct declaration_array *
-get_declaration_array(const struct declaration *decl)
+get_declaration_array(const struct bt_declaration *decl)
 {
        if (!decl || bt_ctf_field_type(decl) != CTF_TYPE_ARRAY)
                return NULL;
 {
        if (!decl || bt_ctf_field_type(decl) != CTF_TYPE_ARRAY)
                return NULL;
@@ -382,14 +382,14 @@ get_declaration_array(const struct declaration *decl)
 }
 
 static const struct declaration_sequence *
 }
 
 static const struct declaration_sequence *
-get_declaration_sequence(const struct declaration *decl)
+get_declaration_sequence(const struct bt_declaration *decl)
 {
        if (!decl || bt_ctf_field_type(decl) != CTF_TYPE_SEQUENCE)
                return NULL;
        return container_of(decl, const struct declaration_sequence, p);
 }
 
 {
        if (!decl || bt_ctf_field_type(decl) != CTF_TYPE_SEQUENCE)
                return NULL;
        return container_of(decl, const struct declaration_sequence, p);
 }
 
-int bt_ctf_get_int_signedness(const struct declaration *decl)
+int bt_ctf_get_int_signedness(const struct bt_declaration *decl)
 {
        const struct declaration_integer *integer;
 
 {
        const struct declaration_integer *integer;
 
@@ -401,7 +401,7 @@ int bt_ctf_get_int_signedness(const struct declaration *decl)
        return integer->signedness;
 }
 
        return integer->signedness;
 }
 
-int bt_ctf_get_int_base(const struct declaration *decl)
+int bt_ctf_get_int_base(const struct bt_declaration *decl)
 {
        const struct declaration_integer *integer;
 
 {
        const struct declaration_integer *integer;
 
@@ -413,7 +413,7 @@ int bt_ctf_get_int_base(const struct declaration *decl)
        return integer->base;
 }
 
        return integer->base;
 }
 
-int bt_ctf_get_int_byte_order(const struct declaration *decl)
+int bt_ctf_get_int_byte_order(const struct bt_declaration *decl)
 {
        const struct declaration_integer *integer;
 
 {
        const struct declaration_integer *integer;
 
@@ -425,7 +425,7 @@ int bt_ctf_get_int_byte_order(const struct declaration *decl)
        return integer->byte_order;
 }
 
        return integer->byte_order;
 }
 
-ssize_t bt_ctf_get_int_len(const struct declaration *decl)
+ssize_t bt_ctf_get_int_len(const struct bt_declaration *decl)
 {
        const struct declaration_integer *integer;
 
 {
        const struct declaration_integer *integer;
 
@@ -485,7 +485,7 @@ const char *bt_ctf_get_enum_str(const struct bt_definition *field)
        return ret;
 }
 
        return ret;
 }
 
-enum ctf_string_encoding bt_ctf_get_encoding(const struct declaration *decl)
+enum ctf_string_encoding bt_ctf_get_encoding(const struct bt_declaration *decl)
 {
        enum ctf_string_encoding ret = 0;
        enum ctf_type_id type;
 {
        enum ctf_string_encoding ret = 0;
        enum ctf_type_id type;
@@ -540,7 +540,7 @@ error:
        return -1;
 }
 
        return -1;
 }
 
-int bt_ctf_get_array_len(const struct declaration *decl)
+int bt_ctf_get_array_len(const struct bt_declaration *decl)
 {
        const struct declaration_array *array;
 
 {
        const struct declaration_array *array;
 
@@ -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));
 }
 
        return rem_(g_quark_to_string(((struct declaration_field *) field)->name));
 }
 
-const struct declaration *bt_ctf_get_decl_from_def(const struct bt_definition *def)
+const struct bt_declaration *bt_ctf_get_decl_from_def(const struct bt_definition *def)
 {
        if (def)
                return def->declaration;
 {
        if (def)
                return def->declaration;
@@ -775,7 +775,7 @@ const struct declaration *bt_ctf_get_decl_from_def(const struct bt_definition *d
        return NULL;
 }
 
        return NULL;
 }
 
-const struct declaration *bt_ctf_get_decl_from_field_decl(
+const struct bt_declaration *bt_ctf_get_decl_from_field_decl(
                const struct bt_ctf_field_decl *field)
 {
        if (field)
                const struct bt_ctf_field_decl *field)
 {
        if (field)
index ebf8b1b2328fe2396b626462acb58eb08ed79c1a..4671d1b813353aab9b1d0490784d57b78c329ed2 100644 (file)
@@ -58,7 +58,7 @@ struct last_enum_value {
 int opt_clock_force_correlate;
 
 static
 int opt_clock_force_correlate;
 
 static
-struct declaration *ctf_type_specifier_list_visit(FILE *fd,
+struct bt_declaration *ctf_type_specifier_list_visit(FILE *fd,
                int depth, struct ctf_node *type_specifier_list,
                struct declaration_scope *declaration_scope,
                struct ctf_trace *trace);
                int depth, struct ctf_node *type_specifier_list,
                struct declaration_scope *declaration_scope,
                struct ctf_trace *trace);
@@ -411,12 +411,12 @@ GQuark create_typealias_identifier(FILE *fd, int depth,
 }
 
 static
 }
 
 static
-struct declaration *ctf_type_declarator_visit(FILE *fd, int depth,
+struct bt_declaration *ctf_type_declarator_visit(FILE *fd, int depth,
        struct ctf_node *type_specifier_list,
        GQuark *field_name,
        struct ctf_node *node_type_declarator,
        struct declaration_scope *declaration_scope,
        struct ctf_node *type_specifier_list,
        GQuark *field_name,
        struct ctf_node *node_type_declarator,
        struct declaration_scope *declaration_scope,
-       struct declaration *nested_declaration,
+       struct bt_declaration *nested_declaration,
        struct ctf_trace *trace)
 {
        /*
        struct ctf_trace *trace)
 {
        /*
@@ -483,7 +483,7 @@ struct declaration *ctf_type_declarator_visit(FILE *fd, int depth,
                        *field_name = 0;
                return nested_declaration;
        } else {
                        *field_name = 0;
                return nested_declaration;
        } else {
-               struct declaration *declaration;
+               struct bt_declaration *declaration;
                struct ctf_node *first;
 
                /* TYPEDEC_NESTED */
                struct ctf_node *first;
 
                /* TYPEDEC_NESTED */
@@ -562,7 +562,7 @@ int ctf_struct_type_declarators_visit(FILE *fd, int depth,
        GQuark field_name;
 
        bt_list_for_each_entry(iter, type_declarators, siblings) {
        GQuark field_name;
 
        bt_list_for_each_entry(iter, type_declarators, siblings) {
-               struct declaration *field_declaration;
+               struct bt_declaration *field_declaration;
 
                field_declaration = ctf_type_declarator_visit(fd, depth,
                                                type_specifier_list,
 
                field_declaration = ctf_type_declarator_visit(fd, depth,
                                                type_specifier_list,
@@ -600,7 +600,7 @@ int ctf_variant_type_declarators_visit(FILE *fd, int depth,
        GQuark field_name;
 
        bt_list_for_each_entry(iter, type_declarators, siblings) {
        GQuark field_name;
 
        bt_list_for_each_entry(iter, type_declarators, siblings) {
-               struct declaration *field_declaration;
+               struct bt_declaration *field_declaration;
 
                field_declaration = ctf_type_declarator_visit(fd, depth,
                                                type_specifier_list,
 
                field_declaration = ctf_type_declarator_visit(fd, depth,
                                                type_specifier_list,
@@ -635,7 +635,7 @@ int ctf_typedef_visit(FILE *fd, int depth, struct declaration_scope *scope,
        GQuark identifier;
 
        bt_list_for_each_entry(iter, type_declarators, siblings) {
        GQuark identifier;
 
        bt_list_for_each_entry(iter, type_declarators, siblings) {
-               struct declaration *type_declaration;
+               struct bt_declaration *type_declaration;
                int ret;
        
                type_declaration = ctf_type_declarator_visit(fd, depth,
                int ret;
        
                type_declaration = ctf_type_declarator_visit(fd, depth,
@@ -670,7 +670,7 @@ int ctf_typealias_visit(FILE *fd, int depth, struct declaration_scope *scope,
                struct ctf_node *target, struct ctf_node *alias,
                struct ctf_trace *trace)
 {
                struct ctf_node *target, struct ctf_node *alias,
                struct ctf_trace *trace)
 {
-       struct declaration *type_declaration;
+       struct bt_declaration *type_declaration;
        struct ctf_node *node;
        GQuark dummy_id;
        GQuark alias_q;
        struct ctf_node *node;
        GQuark dummy_id;
        GQuark alias_q;
@@ -744,7 +744,7 @@ int ctf_struct_declaration_list_visit(FILE *fd, int depth,
 
        switch (iter->type) {
        case NODE_TYPEDEF:
 
        switch (iter->type) {
        case NODE_TYPEDEF:
-               /* For each declarator, declare type and add type to struct declaration scope */
+               /* For each declarator, declare type and add type to struct bt_declaration scope */
                ret = ctf_typedef_visit(fd, depth,
                        struct_declaration->scope,
                        iter->u._typedef.type_specifier_list,
                ret = ctf_typedef_visit(fd, depth,
                        struct_declaration->scope,
                        iter->u._typedef.type_specifier_list,
@@ -753,7 +753,7 @@ int ctf_struct_declaration_list_visit(FILE *fd, int depth,
                        return ret;
                break;
        case NODE_TYPEALIAS:
                        return ret;
                break;
        case NODE_TYPEALIAS:
-               /* Declare type with declarator and add type to struct declaration scope */
+               /* Declare type with declarator and add type to struct bt_declaration scope */
                ret = ctf_typealias_visit(fd, depth,
                        struct_declaration->scope,
                        iter->u.typealias.target,
                ret = ctf_typealias_visit(fd, depth,
                        struct_declaration->scope,
                        iter->u.typealias.target,
@@ -823,7 +823,7 @@ int ctf_variant_declaration_list_visit(FILE *fd, int depth,
 }
 
 static
 }
 
 static
-struct declaration *ctf_declaration_struct_visit(FILE *fd,
+struct bt_declaration *ctf_declaration_struct_visit(FILE *fd,
        int depth, const char *name, struct bt_list_head *declaration_list,
        int has_body, struct bt_list_head *min_align,
        struct declaration_scope *declaration_scope,
        int depth, const char *name, struct bt_list_head *declaration_list,
        int has_body, struct bt_list_head *min_align,
        struct declaration_scope *declaration_scope,
@@ -894,7 +894,7 @@ error:
 }
 
 static
 }
 
 static
-struct declaration *ctf_declaration_variant_visit(FILE *fd,
+struct bt_declaration *ctf_declaration_variant_visit(FILE *fd,
        int depth, const char *name, const char *choice,
        struct bt_list_head *declaration_list,
        int has_body, struct declaration_scope *declaration_scope,
        int depth, const char *name, const char *choice,
        struct bt_list_head *declaration_list,
        int has_body, struct declaration_scope *declaration_scope,
@@ -1053,7 +1053,7 @@ int ctf_enumerator_list_visit(FILE *fd, int depth,
 }
 
 static
 }
 
 static
-struct declaration *ctf_declaration_enum_visit(FILE *fd, int depth,
+struct bt_declaration *ctf_declaration_enum_visit(FILE *fd, int depth,
                        const char *name,
                        struct ctf_node *container_type,
                        struct bt_list_head *enumerator_list,
                        const char *name,
                        struct ctf_node *container_type,
                        struct bt_list_head *enumerator_list,
@@ -1061,7 +1061,7 @@ struct declaration *ctf_declaration_enum_visit(FILE *fd, int depth,
                        struct declaration_scope *declaration_scope,
                        struct ctf_trace *trace)
 {
                        struct declaration_scope *declaration_scope,
                        struct ctf_trace *trace)
 {
-       struct declaration *declaration;
+       struct bt_declaration *declaration;
        struct declaration_enum *enum_declaration;
        struct declaration_integer *integer_declaration;
        struct last_enum_value last_value;
        struct declaration_enum *enum_declaration;
        struct declaration_integer *integer_declaration;
        struct last_enum_value last_value;
@@ -1146,12 +1146,12 @@ error:
 }
 
 static
 }
 
 static
-struct declaration *ctf_declaration_type_specifier_visit(FILE *fd, int depth,
+struct bt_declaration *ctf_declaration_type_specifier_visit(FILE *fd, int depth,
                struct ctf_node *type_specifier_list,
                struct declaration_scope *declaration_scope)
 {
        GString *str;
                struct ctf_node *type_specifier_list,
                struct declaration_scope *declaration_scope)
 {
        GString *str;
-       struct declaration *declaration;
+       struct bt_declaration *declaration;
        char *str_c;
        int ret;
        GQuark id_q;
        char *str_c;
        int ret;
        GQuark id_q;
@@ -1263,7 +1263,7 @@ int get_byte_order(FILE *fd, int depth, struct ctf_node *unary_expression,
 }
 
 static
 }
 
 static
-struct declaration *ctf_declaration_integer_visit(FILE *fd, int depth,
+struct bt_declaration *ctf_declaration_integer_visit(FILE *fd, int depth,
                struct bt_list_head *expressions,
                struct ctf_trace *trace)
 {
                struct bt_list_head *expressions,
                struct ctf_trace *trace)
 {
@@ -1449,7 +1449,7 @@ struct declaration *ctf_declaration_integer_visit(FILE *fd, int depth,
 }
 
 static
 }
 
 static
-struct declaration *ctf_declaration_floating_point_visit(FILE *fd, int depth,
+struct bt_declaration *ctf_declaration_floating_point_visit(FILE *fd, int depth,
                struct bt_list_head *expressions,
                struct ctf_trace *trace)
 {
                struct bt_list_head *expressions,
                struct ctf_trace *trace)
 {
@@ -1528,7 +1528,7 @@ struct declaration *ctf_declaration_floating_point_visit(FILE *fd, int depth,
 }
 
 static
 }
 
 static
-struct declaration *ctf_declaration_string_visit(FILE *fd, int depth,
+struct bt_declaration *ctf_declaration_string_visit(FILE *fd, int depth,
                struct bt_list_head *expressions,
                struct ctf_trace *trace)
 {
                struct bt_list_head *expressions,
                struct ctf_trace *trace)
 {
@@ -1564,7 +1564,7 @@ struct declaration *ctf_declaration_string_visit(FILE *fd, int depth,
 
 
 static
 
 
 static
-struct declaration *ctf_type_specifier_list_visit(FILE *fd,
+struct bt_declaration *ctf_type_specifier_list_visit(FILE *fd,
                int depth, struct ctf_node *type_specifier_list,
                struct declaration_scope *declaration_scope,
                struct ctf_trace *trace)
                int depth, struct ctf_node *type_specifier_list,
                struct declaration_scope *declaration_scope,
                struct ctf_trace *trace)
@@ -1715,7 +1715,7 @@ int ctf_event_declaration_visit(FILE *fd, int depth, struct ctf_node *node, stru
                        }
                        CTF_EVENT_SET_FIELD(event, stream_id);
                } else if (!strcmp(left, "context")) {
                        }
                        CTF_EVENT_SET_FIELD(event, stream_id);
                } else if (!strcmp(left, "context")) {
-                       struct declaration *declaration;
+                       struct bt_declaration *declaration;
 
                        if (event->context_decl) {
                                fprintf(fd, "[error] %s: context already declared in event declaration\n", __func__);
 
                        if (event->context_decl) {
                                fprintf(fd, "[error] %s: context already declared in event declaration\n", __func__);
@@ -1736,7 +1736,7 @@ int ctf_event_declaration_visit(FILE *fd, int depth, struct ctf_node *node, stru
                        }
                        event->context_decl = container_of(declaration, struct declaration_struct, p);
                } else if (!strcmp(left, "fields")) {
                        }
                        event->context_decl = container_of(declaration, struct declaration_struct, p);
                } else if (!strcmp(left, "fields")) {
-                       struct declaration *declaration;
+                       struct bt_declaration *declaration;
 
                        if (event->fields_decl) {
                                fprintf(fd, "[error] %s: fields already declared in event declaration\n", __func__);
 
                        if (event->fields_decl) {
                                fprintf(fd, "[error] %s: fields already declared in event declaration\n", __func__);
@@ -1915,7 +1915,7 @@ int ctf_stream_declaration_visit(FILE *fd, int depth, struct ctf_node *node, str
                        }
                        CTF_STREAM_SET_FIELD(stream, stream_id);
                } else if (!strcmp(left, "event.header")) {
                        }
                        CTF_STREAM_SET_FIELD(stream, stream_id);
                } else if (!strcmp(left, "event.header")) {
-                       struct declaration *declaration;
+                       struct bt_declaration *declaration;
 
                        if (stream->event_header_decl) {
                                fprintf(fd, "[error] %s: event.header already declared in stream declaration\n", __func__);
 
                        if (stream->event_header_decl) {
                                fprintf(fd, "[error] %s: event.header already declared in stream declaration\n", __func__);
@@ -1936,7 +1936,7 @@ int ctf_stream_declaration_visit(FILE *fd, int depth, struct ctf_node *node, str
                        }
                        stream->event_header_decl = container_of(declaration, struct declaration_struct, p);
                } else if (!strcmp(left, "event.context")) {
                        }
                        stream->event_header_decl = container_of(declaration, struct declaration_struct, p);
                } else if (!strcmp(left, "event.context")) {
-                       struct declaration *declaration;
+                       struct bt_declaration *declaration;
 
                        if (stream->event_context_decl) {
                                fprintf(fd, "[error] %s: event.context already declared in stream declaration\n", __func__);
 
                        if (stream->event_context_decl) {
                                fprintf(fd, "[error] %s: event.context already declared in stream declaration\n", __func__);
@@ -1957,7 +1957,7 @@ int ctf_stream_declaration_visit(FILE *fd, int depth, struct ctf_node *node, str
                        }
                        stream->event_context_decl = container_of(declaration, struct declaration_struct, p);
                } else if (!strcmp(left, "packet.context")) {
                        }
                        stream->event_context_decl = container_of(declaration, struct declaration_struct, p);
                } else if (!strcmp(left, "packet.context")) {
-                       struct declaration *declaration;
+                       struct bt_declaration *declaration;
 
                        if (stream->packet_context_decl) {
                                fprintf(fd, "[error] %s: packet.context already declared in stream declaration\n", __func__);
 
                        if (stream->packet_context_decl) {
                                fprintf(fd, "[error] %s: packet.context already declared in stream declaration\n", __func__);
@@ -2155,7 +2155,7 @@ int ctf_trace_declaration_visit(FILE *fd, int depth, struct ctf_node *node, stru
                        }
                        CTF_TRACE_SET_FIELD(trace, byte_order);
                } else if (!strcmp(left, "packet.header")) {
                        }
                        CTF_TRACE_SET_FIELD(trace, byte_order);
                } else if (!strcmp(left, "packet.header")) {
-                       struct declaration *declaration;
+                       struct bt_declaration *declaration;
 
                        if (trace->packet_header_decl) {
                                fprintf(fd, "[error] %s: packet.header already declared in trace declaration\n", __func__);
 
                        if (trace->packet_header_decl) {
                                fprintf(fd, "[error] %s: packet.header already declared in trace declaration\n", __func__);
@@ -2841,7 +2841,7 @@ int ctf_root_declaration_visit(FILE *fd, int depth, struct ctf_node *node, struc
                break;
        case NODE_TYPE_SPECIFIER_LIST:
        {
                break;
        case NODE_TYPE_SPECIFIER_LIST:
        {
-               struct declaration *declaration;
+               struct bt_declaration *declaration;
 
                /*
                 * Just add the type specifier to the root scope
 
                /*
                 * Just add the type specifier to the root scope
index 683c1716099de06bea3d1700c84ac82ed380c323..ea3ecfd8a656d5db9b4f389ee1302b5b6b5926ca 100644 (file)
@@ -34,7 +34,7 @@ int ctf_array_read(struct bt_stream_pos *ppos, struct bt_definition *definition)
                container_of(definition, struct definition_array, p);
        struct declaration_array *array_declaration =
                array_definition->declaration;
                container_of(definition, struct definition_array, p);
        struct declaration_array *array_declaration =
                array_definition->declaration;
-       struct declaration *elem = array_declaration->elem;
+       struct bt_declaration *elem = array_declaration->elem;
        struct ctf_stream_pos *pos =
                container_of(ppos, struct ctf_stream_pos, parent);
 
        struct ctf_stream_pos *pos =
                container_of(ppos, struct ctf_stream_pos, parent);
 
@@ -70,7 +70,7 @@ int ctf_array_write(struct bt_stream_pos *ppos, struct bt_definition *definition
                container_of(definition, struct definition_array, p);
        struct declaration_array *array_declaration =
                array_definition->declaration;
                container_of(definition, struct definition_array, p);
        struct declaration_array *array_declaration =
                array_definition->declaration;
-       struct declaration *elem = array_declaration->elem;
+       struct bt_declaration *elem = array_declaration->elem;
        struct ctf_stream_pos *pos =
                container_of(ppos, struct ctf_stream_pos, parent);
 
        struct ctf_stream_pos *pos =
                container_of(ppos, struct ctf_stream_pos, parent);
 
index 53ebf75c30eec90f36d0c677f4ad98b5caa6bbc6..898c36725672c8e4b01084e1850e4c27050634d6 100644 (file)
@@ -34,7 +34,7 @@ int ctf_sequence_read(struct bt_stream_pos *ppos, struct bt_definition *definiti
                container_of(definition, struct definition_sequence, p);
        struct declaration_sequence *sequence_declaration =
                sequence_definition->declaration;
                container_of(definition, struct definition_sequence, p);
        struct declaration_sequence *sequence_declaration =
                sequence_definition->declaration;
-       struct declaration *elem = sequence_declaration->elem;
+       struct bt_declaration *elem = sequence_declaration->elem;
        struct ctf_stream_pos *pos = ctf_pos(ppos);
 
        if (elem->id == CTF_TYPE_INTEGER) {
        struct ctf_stream_pos *pos = ctf_pos(ppos);
 
        if (elem->id == CTF_TYPE_INTEGER) {
@@ -69,7 +69,7 @@ int ctf_sequence_write(struct bt_stream_pos *ppos, struct bt_definition *definit
                container_of(definition, struct definition_sequence, p);
        struct declaration_sequence *sequence_declaration =
                sequence_definition->declaration;
                container_of(definition, struct definition_sequence, p);
        struct declaration_sequence *sequence_declaration =
                sequence_definition->declaration;
-       struct declaration *elem = sequence_declaration->elem;
+       struct bt_declaration *elem = sequence_declaration->elem;
        struct ctf_stream_pos *pos = ctf_pos(ppos);
 
        if (elem->id == CTF_TYPE_INTEGER) {
        struct ctf_stream_pos *pos = ctf_pos(ppos);
 
        if (elem->id == CTF_TYPE_INTEGER) {
index b004767e12920c230136514a96f75d1a24b28640..106f682c8ee2d886a9daded1bb32d027e20a7abc 100644 (file)
@@ -30,7 +30,7 @@
 
 int ctf_struct_rw(struct bt_stream_pos *ppos, struct bt_definition *definition)
 {
 
 int ctf_struct_rw(struct bt_stream_pos *ppos, struct bt_definition *definition)
 {
-       struct declaration *declaration = definition->declaration;
+       struct bt_declaration *declaration = definition->declaration;
        struct ctf_stream_pos *pos = ctf_pos(ppos);
 
        ctf_align_pos(pos, declaration->alignment);
        struct ctf_stream_pos *pos = ctf_pos(ppos);
 
        ctf_align_pos(pos, declaration->alignment);
index ece8b33338dd58f7e38a53a9c5bf6c660d83a190..b3d6396a6f9f075f21be4fd71e871a55c2c038f6 100644 (file)
@@ -30,7 +30,7 @@
 
 int ctf_variant_rw(struct bt_stream_pos *ppos, struct bt_definition *definition)
 {
 
 int ctf_variant_rw(struct bt_stream_pos *ppos, struct bt_definition *definition)
 {
-       struct declaration *declaration = definition->declaration;
+       struct bt_declaration *declaration = definition->declaration;
        struct ctf_stream_pos *pos = ctf_pos(ppos);
 
        ctf_align_pos(pos, declaration->alignment);
        struct ctf_stream_pos *pos = ctf_pos(ppos);
 
        ctf_align_pos(pos, declaration->alignment);
index ecc5c28469ae05a59e19cde2b6952487b80cfe24..c92470cf83de30effd11a2da27928f804f501980 100644 (file)
@@ -40,7 +40,7 @@ extern "C" {
 #endif
 
 struct bt_definition;
 #endif
 
 struct bt_definition;
-struct declaration;
+struct bt_declaration;
 struct bt_ctf_event;
 struct bt_ctf_event_decl;
 struct bt_ctf_field_decl;
 struct bt_ctf_event;
 struct bt_ctf_event_decl;
 struct bt_ctf_field_decl;
@@ -158,19 +158,19 @@ 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
  */
  * 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 bt_definition *def);
+const struct bt_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
  * a field_decl or NULL on error
  */
 
 /*
  * bt_ctf_get_decl_from_field_decl: return the declaration of a field from
  * a field_decl or NULL on error
  */
-const struct declaration *bt_ctf_get_decl_from_field_decl(
+const struct bt_declaration *bt_ctf_get_decl_from_field_decl(
                const struct bt_ctf_field_decl *field);
 
 /*
  * bt_ctf_field_type: returns the type of a field or -1 if unknown
  */
                const struct bt_ctf_field_decl *field);
 
 /*
  * bt_ctf_field_type: returns the type of a field or -1 if unknown
  */
-enum ctf_type_id bt_ctf_field_type(const struct declaration *decl);
+enum ctf_type_id bt_ctf_field_type(const struct bt_declaration *decl);
 
 /*
  * bt_ctf_get_int_signedness: return the signedness of an integer
 
 /*
  * bt_ctf_get_int_signedness: return the signedness of an integer
@@ -179,37 +179,37 @@ enum ctf_type_id bt_ctf_field_type(const struct declaration *decl);
  * return 1 if signed
  * return -1 on error
  */
  * return 1 if signed
  * return -1 on error
  */
-int bt_ctf_get_int_signedness(const struct declaration *decl);
+int bt_ctf_get_int_signedness(const struct bt_declaration *decl);
 
 /*
  * bt_ctf_get_int_base: return the base of an int or a negative value on error
  */
 
 /*
  * bt_ctf_get_int_base: return the base of an int or a negative value on error
  */
-int bt_ctf_get_int_base(const struct declaration *decl);
+int bt_ctf_get_int_base(const struct bt_declaration *decl);
 
 /*
  * bt_ctf_get_int_byte_order: return the byte order of an int or a negative
  * value on error
  */
 
 /*
  * bt_ctf_get_int_byte_order: return the byte order of an int or a negative
  * value on error
  */
-int bt_ctf_get_int_byte_order(const struct declaration *decl);
+int bt_ctf_get_int_byte_order(const struct bt_declaration *decl);
 
 /*
  * bt_ctf_get_int_len: return the size, in bits, of an int or a negative
  * value on error
  */
 
 /*
  * bt_ctf_get_int_len: return the size, in bits, of an int or a negative
  * value on error
  */
-ssize_t bt_ctf_get_int_len(const struct declaration *decl);
+ssize_t bt_ctf_get_int_len(const struct bt_declaration *decl);
 
 /*
  * bt_ctf_get_encoding: return the encoding of an int, a string, or of
  * the integer contained in a char array or a sequence.
  * return a negative value on error
  */
 
 /*
  * bt_ctf_get_encoding: return the encoding of an int, a string, or of
  * the integer contained in a char array or a sequence.
  * return a negative value on error
  */
-enum ctf_string_encoding bt_ctf_get_encoding(const struct declaration *decl);
+enum ctf_string_encoding bt_ctf_get_encoding(const struct bt_declaration *decl);
 
 /*
  * bt_ctf_get_array_len: return the len of an array or a negative
  * value on error
  */
 
 /*
  * bt_ctf_get_array_len: return the len of an array or a negative
  * value on error
  */
-int bt_ctf_get_array_len(const struct declaration *decl);
+int bt_ctf_get_array_len(const struct bt_declaration *decl);
 
 /*
  * Field access functions
 
 /*
  * Field access functions
index 0b8d1c1b6037773bdf945545fdd5e6a71deebde0..22c6876d5e34195ae14c67f167975637381d6d19 100644 (file)
@@ -78,16 +78,16 @@ struct definition_scope {
        GArray *scope_path;     /* array of GQuark */
 };
 
        GArray *scope_path;     /* array of GQuark */
 };
 
-struct declaration {
+struct bt_declaration {
        enum ctf_type_id id;
        size_t alignment;       /* type alignment, in bits */
        int ref;                /* number of references to the type */
        /*
         * declaration_free called with declaration ref is decremented to 0.
         */
        enum ctf_type_id id;
        size_t alignment;       /* type alignment, in bits */
        int ref;                /* number of references to the type */
        /*
         * declaration_free called with declaration ref is decremented to 0.
         */
-       void (*declaration_free)(struct declaration *declaration);
+       void (*declaration_free)(struct bt_declaration *declaration);
        struct bt_definition *
        struct bt_definition *
-               (*definition_new)(struct declaration *declaration,
+               (*definition_new)(struct bt_declaration *declaration,
                                  struct definition_scope *parent_scope,
                                  GQuark field_name, int index,
                                  const char *root_name);
                                  struct definition_scope *parent_scope,
                                  GQuark field_name, int index,
                                  const char *root_name);
@@ -98,7 +98,7 @@ struct declaration {
 };
 
 struct bt_definition {
 };
 
 struct bt_definition {
-       struct declaration *declaration;
+       struct bt_declaration *declaration;
        int index;              /* Position of the definition in its container */
        GQuark name;            /* Field name in its container (or 0 if unset) */
        int ref;                /* number of references to the definition */
        int index;              /* Position of the definition in its container */
        GQuark name;            /* Field name in its container (or 0 if unset) */
        int ref;                /* number of references to the definition */
@@ -134,7 +134,7 @@ int generic_rw(struct bt_stream_pos *pos, struct bt_definition *definition)
  * read/write non aligned on CHAR_BIT.
  */
 struct declaration_integer {
  * read/write non aligned on CHAR_BIT.
  */
 struct declaration_integer {
-       struct declaration p;
+       struct bt_declaration p;
        size_t len;             /* length, in bits. */
        int byte_order;         /* byte order */
        int signedness;
        size_t len;             /* length, in bits. */
        int byte_order;         /* byte order */
        int signedness;
@@ -154,7 +154,7 @@ struct definition_integer {
 };
 
 struct declaration_float {
 };
 
 struct declaration_float {
-       struct declaration p;
+       struct bt_declaration p;
        struct declaration_integer *sign;
        struct declaration_integer *mantissa;
        struct declaration_integer *exp;
        struct declaration_integer *sign;
        struct declaration_integer *mantissa;
        struct declaration_integer *exp;
@@ -211,7 +211,7 @@ struct enum_table {
 };
 
 struct declaration_enum {
 };
 
 struct declaration_enum {
-       struct declaration p;
+       struct bt_declaration p;
        struct declaration_integer *integer_declaration;
        struct enum_table table;
 };
        struct declaration_integer *integer_declaration;
        struct enum_table table;
 };
@@ -225,7 +225,7 @@ struct definition_enum {
 };
 
 struct declaration_string {
 };
 
 struct declaration_string {
-       struct declaration p;
+       struct bt_declaration p;
        enum ctf_string_encoding encoding;
 };
 
        enum ctf_string_encoding encoding;
 };
 
@@ -238,11 +238,11 @@ struct definition_string {
 
 struct declaration_field {
        GQuark name;
 
 struct declaration_field {
        GQuark name;
-       struct declaration *declaration;
+       struct bt_declaration *declaration;
 };
 
 struct declaration_struct {
 };
 
 struct declaration_struct {
-       struct declaration p;
+       struct bt_declaration p;
        GHashTable *fields_by_name;     /* Tuples (field name, field index) */
        struct declaration_scope *scope;
        GArray *fields;                 /* Array of declaration_field */
        GHashTable *fields_by_name;     /* Tuples (field name, field index) */
        struct declaration_scope *scope;
        GArray *fields;                 /* Array of declaration_field */
@@ -255,14 +255,14 @@ struct definition_struct {
 };
 
 struct declaration_untagged_variant {
 };
 
 struct declaration_untagged_variant {
-       struct declaration p;
+       struct bt_declaration p;
        GHashTable *fields_by_tag;      /* Tuples (field tag, field index) */
        struct declaration_scope *scope;
        GArray *fields;                 /* Array of declaration_field */
 };
 
 struct declaration_variant {
        GHashTable *fields_by_tag;      /* Tuples (field tag, field index) */
        struct declaration_scope *scope;
        GArray *fields;                 /* Array of declaration_field */
 };
 
 struct declaration_variant {
-       struct declaration p;
+       struct bt_declaration p;
        struct declaration_untagged_variant *untagged_variant;
        GArray *tag_name;               /* Array of GQuark */
 };
        struct declaration_untagged_variant *untagged_variant;
        GArray *tag_name;               /* Array of GQuark */
 };
@@ -277,9 +277,9 @@ struct definition_variant {
 };
 
 struct declaration_array {
 };
 
 struct declaration_array {
-       struct declaration p;
+       struct bt_declaration p;
        size_t len;
        size_t len;
-       struct declaration *elem;
+       struct bt_declaration *elem;
        struct declaration_scope *scope;
 };
 
        struct declaration_scope *scope;
 };
 
@@ -291,9 +291,9 @@ struct definition_array {
 };
 
 struct declaration_sequence {
 };
 
 struct declaration_sequence {
-       struct declaration p;
+       struct bt_declaration p;
        GArray *length_name;            /* Array of GQuark */
        GArray *length_name;            /* Array of GQuark */
-       struct declaration *elem;
+       struct bt_declaration *elem;
        struct declaration_scope *scope;
 };
 
        struct declaration_scope *scope;
 };
 
@@ -306,9 +306,9 @@ struct definition_sequence {
 };
 
 int bt_register_declaration(GQuark declaration_name,
 };
 
 int bt_register_declaration(GQuark declaration_name,
-                        struct declaration *declaration,
+                        struct bt_declaration *declaration,
                         struct declaration_scope *scope);
                         struct declaration_scope *scope);
-struct declaration *bt_lookup_declaration(GQuark declaration_name,
+struct bt_declaration *bt_lookup_declaration(GQuark declaration_name,
                                struct declaration_scope *scope);
 
 /*
                                struct declaration_scope *scope);
 
 /*
@@ -364,8 +364,8 @@ int compare_definition_path(struct bt_definition *definition, GQuark path)
        return definition->path == path;
 }
 
        return definition->path == path;
 }
 
-void bt_declaration_ref(struct declaration *declaration);
-void bt_declaration_unref(struct declaration *declaration);
+void bt_declaration_ref(struct bt_declaration *declaration);
+void bt_declaration_unref(struct bt_declaration *declaration);
 
 void bt_definition_ref(struct bt_definition *definition);
 void bt_definition_unref(struct bt_definition *definition);
 
 void bt_definition_ref(struct bt_definition *definition);
 void bt_definition_unref(struct bt_definition *definition);
@@ -435,7 +435,7 @@ struct declaration_struct *
                               uint64_t min_align);
 void bt_struct_declaration_add_field(struct declaration_struct *struct_declaration,
                                  const char *field_name,
                               uint64_t min_align);
 void bt_struct_declaration_add_field(struct declaration_struct *struct_declaration,
                                  const char *field_name,
-                                 struct declaration *field_declaration);
+                                 struct bt_declaration *field_declaration);
 /*
  * Returns the index of a field within a structure.
  */
 /*
  * Returns the index of a field within a structure.
  */
@@ -465,7 +465,7 @@ struct declaration_variant *bt_variant_declaration_new(struct declaration_untagg
 
 void bt_untagged_variant_declaration_add_field(struct declaration_untagged_variant *untagged_variant_declaration,
                const char *field_name,
 
 void bt_untagged_variant_declaration_add_field(struct declaration_untagged_variant *untagged_variant_declaration,
                const char *field_name,
-               struct declaration *field_declaration);
+               struct bt_declaration *field_declaration);
 struct declaration_field *
        bt_untagged_variant_declaration_get_field_from_tag(struct declaration_untagged_variant *untagged_variant_declaration,
                GQuark tag);
 struct declaration_field *
        bt_untagged_variant_declaration_get_field_from_tag(struct declaration_untagged_variant *untagged_variant_declaration,
                GQuark tag);
@@ -488,7 +488,7 @@ int bt_variant_rw(struct bt_stream_pos *pos, struct bt_definition *definition);
  * array.
  */
 struct declaration_array *
  * array.
  */
 struct declaration_array *
-       bt_array_declaration_new(size_t len, struct declaration *elem_declaration,
+       bt_array_declaration_new(size_t len, struct bt_declaration *elem_declaration,
                struct declaration_scope *parent_scope);
 uint64_t bt_array_len(struct definition_array *array);
 struct bt_definition *bt_array_index(struct definition_array *array, uint64_t i);
                struct declaration_scope *parent_scope);
 uint64_t bt_array_len(struct definition_array *array);
 struct bt_definition *bt_array_index(struct definition_array *array, uint64_t i);
@@ -502,7 +502,7 @@ int bt_get_array_len(const struct bt_definition *field);
  */
 struct declaration_sequence *
        bt_sequence_declaration_new(const char *length_name,
  */
 struct declaration_sequence *
        bt_sequence_declaration_new(const char *length_name,
-               struct declaration *elem_declaration,
+               struct bt_declaration *elem_declaration,
                struct declaration_scope *parent_scope);
 uint64_t bt_sequence_len(struct definition_sequence *sequence);
 struct bt_definition *bt_sequence_index(struct definition_sequence *sequence, uint64_t i);
                struct declaration_scope *parent_scope);
 uint64_t bt_sequence_len(struct definition_sequence *sequence);
 struct bt_definition *bt_sequence_index(struct definition_sequence *sequence, uint64_t i);
index debc15aa9788d093b83a1d77a0bf0b92e246d082..c9b973bfa13a3d3719c9bdf1d07259c1d7880fa8 100644 (file)
@@ -32,7 +32,7 @@
 #include <inttypes.h>
 
 static
 #include <inttypes.h>
 
 static
-struct bt_definition *_array_definition_new(struct declaration *declaration,
+struct bt_definition *_array_definition_new(struct bt_declaration *declaration,
                        struct definition_scope *parent_scope,
                        GQuark field_name, int index, const char *root_name);
 static
                        struct definition_scope *parent_scope,
                        GQuark field_name, int index, const char *root_name);
 static
@@ -59,7 +59,7 @@ int bt_array_rw(struct bt_stream_pos *pos, struct bt_definition *definition)
 }
 
 static
 }
 
 static
-void _array_declaration_free(struct declaration *declaration)
+void _array_declaration_free(struct bt_declaration *declaration)
 {
        struct declaration_array *array_declaration =
                container_of(declaration, struct declaration_array, p);
 {
        struct declaration_array *array_declaration =
                container_of(declaration, struct declaration_array, p);
@@ -71,11 +71,11 @@ void _array_declaration_free(struct declaration *declaration)
 
 struct declaration_array *
        bt_array_declaration_new(size_t len,
 
 struct declaration_array *
        bt_array_declaration_new(size_t len,
-                             struct declaration *elem_declaration,
+                             struct bt_declaration *elem_declaration,
                              struct declaration_scope *parent_scope)
 {
        struct declaration_array *array_declaration;
                              struct declaration_scope *parent_scope)
 {
        struct declaration_array *array_declaration;
-       struct declaration *declaration;
+       struct bt_declaration *declaration;
 
        array_declaration = g_new(struct declaration_array, 1);
        declaration = &array_declaration->p;
 
        array_declaration = g_new(struct declaration_array, 1);
        declaration = &array_declaration->p;
@@ -94,7 +94,7 @@ struct declaration_array *
 
 static
 struct bt_definition *
 
 static
 struct bt_definition *
-       _array_definition_new(struct declaration *declaration,
+       _array_definition_new(struct bt_declaration *declaration,
                              struct definition_scope *parent_scope,
                              GQuark field_name, int index, const char *root_name)
 {
                              struct definition_scope *parent_scope,
                              GQuark field_name, int index, const char *root_name)
 {
@@ -229,7 +229,7 @@ GString *bt_get_char_array(const struct bt_definition *field)
 {
        struct definition_array *array_definition;
        struct declaration_array *array_declaration;
 {
        struct definition_array *array_definition;
        struct declaration_array *array_declaration;
-       struct declaration *elem;
+       struct bt_declaration *elem;
 
        array_definition = container_of(field, struct definition_array, p);
        array_declaration = array_definition->declaration;
 
        array_definition = container_of(field, struct definition_array, p);
        array_declaration = array_definition->declaration;
index e967e14d17da58dc8b68b0250622c2cf245ac21d..8394e1b35b70b4e2c58b2a9d9ed97d1293eb2c3c 100644 (file)
@@ -41,7 +41,7 @@
 #endif
 
 static
 #endif
 
 static
-struct bt_definition *_enum_definition_new(struct declaration *declaration,
+struct bt_definition *_enum_definition_new(struct bt_declaration *declaration,
                                        struct definition_scope *parent_scope,
                                        GQuark field_name, int index,
                                        const char *root_name);
                                        struct definition_scope *parent_scope,
                                        GQuark field_name, int index,
                                        const char *root_name);
@@ -374,7 +374,7 @@ size_t bt_enum_get_nr_enumerators(struct declaration_enum *enum_declaration)
 }
 
 static
 }
 
 static
-void _enum_declaration_free(struct declaration *declaration)
+void _enum_declaration_free(struct bt_declaration *declaration)
 {
        struct declaration_enum *enum_declaration =
                container_of(declaration, struct declaration_enum, p);
 {
        struct declaration_enum *enum_declaration =
                container_of(declaration, struct declaration_enum, p);
@@ -418,7 +418,7 @@ struct declaration_enum *
 
 static
 struct bt_definition *
 
 static
 struct bt_definition *
-       _enum_definition_new(struct declaration *declaration,
+       _enum_definition_new(struct bt_declaration *declaration,
                             struct definition_scope *parent_scope,
                             GQuark field_name, int index,
                             const char *root_name)
                             struct definition_scope *parent_scope,
                             GQuark field_name, int index,
                             const char *root_name)
index 7aeb9c3aacb5a0b7d6d0c36055e9d7575f58eb82..3b61f8faf0a3ec16b0b95b6544cd058cdabd008e 100644 (file)
@@ -32,7 +32,7 @@
 #include <babeltrace/endian.h>
 
 static
 #include <babeltrace/endian.h>
 
 static
-struct bt_definition *_float_definition_new(struct declaration *declaration,
+struct bt_definition *_float_definition_new(struct bt_declaration *declaration,
                                   struct definition_scope *parent_scope,
                                   GQuark field_name, int index,
                                   const char *root_name);
                                   struct definition_scope *parent_scope,
                                   GQuark field_name, int index,
                                   const char *root_name);
@@ -40,7 +40,7 @@ static
 void _float_definition_free(struct bt_definition *definition);
 
 static
 void _float_definition_free(struct bt_definition *definition);
 
 static
-void _float_declaration_free(struct declaration *declaration)
+void _float_declaration_free(struct bt_declaration *declaration)
 {
        struct declaration_float *float_declaration =
                container_of(declaration, struct declaration_float, p);
 {
        struct declaration_float *float_declaration =
                container_of(declaration, struct declaration_float, p);
@@ -56,7 +56,7 @@ struct declaration_float *
                       size_t exp_len, int byte_order, size_t alignment)
 {
        struct declaration_float *float_declaration;
                       size_t exp_len, int byte_order, size_t alignment)
 {
        struct declaration_float *float_declaration;
-       struct declaration *declaration;
+       struct bt_declaration *declaration;
 
        float_declaration = g_new(struct declaration_float, 1);
        declaration = &float_declaration->p;
 
        float_declaration = g_new(struct declaration_float, 1);
        declaration = &float_declaration->p;
@@ -82,7 +82,7 @@ struct declaration_float *
 
 static
 struct bt_definition *
 
 static
 struct bt_definition *
-       _float_definition_new(struct declaration *declaration,
+       _float_definition_new(struct bt_declaration *declaration,
                              struct definition_scope *parent_scope,
                              GQuark field_name, int index,
                              const char *root_name)
                              struct definition_scope *parent_scope,
                              GQuark field_name, int index,
                              const char *root_name)
index 92c7eb11813026256f7646bfc8a996421c28f902..73d4f2a40116141e173b4cea0532b4cfd0b7b433 100644 (file)
@@ -33,7 +33,7 @@
 #include <stdint.h>
 
 static
 #include <stdint.h>
 
 static
-struct bt_definition *_integer_definition_new(struct declaration *declaration,
+struct bt_definition *_integer_definition_new(struct bt_declaration *declaration,
                               struct definition_scope *parent_scope,
                               GQuark field_name, int index,
                               const char *root_name);
                               struct definition_scope *parent_scope,
                               GQuark field_name, int index,
                               const char *root_name);
@@ -41,7 +41,7 @@ static
 void _integer_definition_free(struct bt_definition *definition);
 
 static
 void _integer_definition_free(struct bt_definition *definition);
 
 static
-void _integer_declaration_free(struct declaration *declaration)
+void _integer_declaration_free(struct bt_declaration *declaration)
 {
        struct declaration_integer *integer_declaration =
                container_of(declaration, struct declaration_integer, p);
 {
        struct declaration_integer *integer_declaration =
                container_of(declaration, struct declaration_integer, p);
@@ -74,7 +74,7 @@ struct declaration_integer *
 
 static
 struct bt_definition *
 
 static
 struct bt_definition *
-       _integer_definition_new(struct declaration *declaration,
+       _integer_definition_new(struct bt_declaration *declaration,
                                struct definition_scope *parent_scope,
                                GQuark field_name, int index,
                                const char *root_name)
                                struct definition_scope *parent_scope,
                                GQuark field_name, int index,
                                const char *root_name)
index 8792325e834427f5855c61651f9de0f33e73bf09..6c61ef7a0c55b70761cbf98f1830eb3553d0ae3a 100644 (file)
@@ -32,7 +32,7 @@
 #include <inttypes.h>
 
 static
 #include <inttypes.h>
 
 static
-struct bt_definition *_sequence_definition_new(struct declaration *declaration,
+struct bt_definition *_sequence_definition_new(struct bt_declaration *declaration,
                                        struct definition_scope *parent_scope,
                                        GQuark field_name, int index,
                                        const char *root_name);
                                        struct definition_scope *parent_scope,
                                        GQuark field_name, int index,
                                        const char *root_name);
@@ -88,7 +88,7 @@ int bt_sequence_rw(struct bt_stream_pos *pos, struct bt_definition *definition)
 }
 
 static
 }
 
 static
-void _sequence_declaration_free(struct declaration *declaration)
+void _sequence_declaration_free(struct bt_declaration *declaration)
 {
        struct declaration_sequence *sequence_declaration =
                container_of(declaration, struct declaration_sequence, p);
 {
        struct declaration_sequence *sequence_declaration =
                container_of(declaration, struct declaration_sequence, p);
@@ -101,11 +101,11 @@ void _sequence_declaration_free(struct declaration *declaration)
 
 struct declaration_sequence *
        bt_sequence_declaration_new(const char *length,
 
 struct declaration_sequence *
        bt_sequence_declaration_new(const char *length,
-                         struct declaration *elem_declaration,
+                         struct bt_declaration *elem_declaration,
                          struct declaration_scope *parent_scope)
 {
        struct declaration_sequence *sequence_declaration;
                          struct declaration_scope *parent_scope)
 {
        struct declaration_sequence *sequence_declaration;
-       struct declaration *declaration;
+       struct bt_declaration *declaration;
 
        sequence_declaration = g_new(struct declaration_sequence, 1);
        declaration = &sequence_declaration->p;
 
        sequence_declaration = g_new(struct declaration_sequence, 1);
        declaration = &sequence_declaration->p;
@@ -126,7 +126,7 @@ struct declaration_sequence *
 }
 
 static
 }
 
 static
-struct bt_definition *_sequence_definition_new(struct declaration *declaration,
+struct bt_definition *_sequence_definition_new(struct bt_declaration *declaration,
                                struct definition_scope *parent_scope,
                                GQuark field_name, int index,
                                const char *root_name)
                                struct definition_scope *parent_scope,
                                GQuark field_name, int index,
                                const char *root_name)
index 5db17164630c5067a5ec1ace2ce7fefd36581fd6..5bbba98c8c047c7cb574126b97191a6b5d23f9de 100644 (file)
@@ -32,7 +32,7 @@
 #include <babeltrace/types.h>
 
 static
 #include <babeltrace/types.h>
 
 static
-struct bt_definition *_string_definition_new(struct declaration *declaration,
+struct bt_definition *_string_definition_new(struct bt_declaration *declaration,
                                struct definition_scope *parent_scope,
                                GQuark field_name, int index,
                                const char *root_name);
                                struct definition_scope *parent_scope,
                                GQuark field_name, int index,
                                const char *root_name);
@@ -40,7 +40,7 @@ static
 void _string_definition_free(struct bt_definition *definition);
 
 static
 void _string_definition_free(struct bt_definition *definition);
 
 static
-void _string_declaration_free(struct declaration *declaration)
+void _string_declaration_free(struct bt_declaration *declaration)
 {
        struct declaration_string *string_declaration =
                container_of(declaration, struct declaration_string, p);
 {
        struct declaration_string *string_declaration =
                container_of(declaration, struct declaration_string, p);
@@ -65,7 +65,7 @@ struct declaration_string *
 
 static
 struct bt_definition *
 
 static
 struct bt_definition *
-       _string_definition_new(struct declaration *declaration,
+       _string_definition_new(struct bt_declaration *declaration,
                               struct definition_scope *parent_scope,
                               GQuark field_name, int index,
                               const char *root_name)
                               struct definition_scope *parent_scope,
                               GQuark field_name, int index,
                               const char *root_name)
index fadc1877043cc5378e93c61db08b3f52ea10fbf7..b9fb6799b938dad37f6788c5bb14cafda8fa571d 100644 (file)
@@ -36,7 +36,7 @@
 #endif
 
 static
 #endif
 
 static
-struct bt_definition *_struct_definition_new(struct declaration *declaration,
+struct bt_definition *_struct_definition_new(struct bt_declaration *declaration,
                                struct definition_scope *parent_scope,
                                GQuark field_name, int index,
                                const char *root_name);
                                struct definition_scope *parent_scope,
                                GQuark field_name, int index,
                                const char *root_name);
@@ -61,7 +61,7 @@ int bt_struct_rw(struct bt_stream_pos *ppos, struct bt_definition *definition)
 }
 
 static
 }
 
 static
-void _struct_declaration_free(struct declaration *declaration)
+void _struct_declaration_free(struct bt_declaration *declaration)
 {
        struct declaration_struct *struct_declaration =
                container_of(declaration, struct declaration_struct, p);
 {
        struct declaration_struct *struct_declaration =
                container_of(declaration, struct declaration_struct, p);
@@ -85,7 +85,7 @@ struct declaration_struct *
                               uint64_t min_align)
 {
        struct declaration_struct *struct_declaration;
                               uint64_t min_align)
 {
        struct declaration_struct *struct_declaration;
-       struct declaration *declaration;
+       struct bt_declaration *declaration;
 
        struct_declaration = g_new(struct declaration_struct, 1);
        declaration = &struct_declaration->p;
 
        struct_declaration = g_new(struct declaration_struct, 1);
        declaration = &struct_declaration->p;
@@ -106,7 +106,7 @@ struct declaration_struct *
 
 static
 struct bt_definition *
 
 static
 struct bt_definition *
-       _struct_definition_new(struct declaration *declaration,
+       _struct_definition_new(struct bt_declaration *declaration,
                               struct definition_scope *parent_scope,
                               GQuark field_name, int index,
                               const char *root_name)
                               struct definition_scope *parent_scope,
                               GQuark field_name, int index,
                               const char *root_name)
@@ -183,7 +183,7 @@ void _struct_definition_free(struct bt_definition *definition)
 
 void bt_struct_declaration_add_field(struct declaration_struct *struct_declaration,
                           const char *field_name,
 
 void bt_struct_declaration_add_field(struct declaration_struct *struct_declaration,
                           const char *field_name,
-                          struct declaration *field_declaration)
+                          struct bt_declaration *field_declaration)
 {
        struct declaration_field *field;
        unsigned long index;
 {
        struct declaration_field *field;
        unsigned long index;
index b235c13ae51bc254c9d1210676a4761917622a07..0d1a89d1946c0146e08ba28ffafcb09fabfa84fc 100644 (file)
@@ -51,7 +51,7 @@ GQuark prefix_quark(const char *prefix, GQuark quark)
 }
 
 static
 }
 
 static
-struct declaration *
+struct bt_declaration *
        bt_lookup_declaration_scope(GQuark declaration_name,
                struct declaration_scope *scope)
 {
        bt_lookup_declaration_scope(GQuark declaration_name,
                struct declaration_scope *scope)
 {
@@ -59,10 +59,10 @@ struct declaration *
                                   (gconstpointer) (unsigned long) declaration_name);
 }
 
                                   (gconstpointer) (unsigned long) declaration_name);
 }
 
-struct declaration *bt_lookup_declaration(GQuark declaration_name,
+struct bt_declaration *bt_lookup_declaration(GQuark declaration_name,
                struct declaration_scope *scope)
 {
                struct declaration_scope *scope)
 {
-       struct declaration *declaration;
+       struct bt_declaration *declaration;
 
        while (scope) {
                declaration = bt_lookup_declaration_scope(declaration_name,
 
        while (scope) {
                declaration = bt_lookup_declaration_scope(declaration_name,
@@ -74,7 +74,7 @@ struct declaration *bt_lookup_declaration(GQuark declaration_name,
        return NULL;
 }
 
        return NULL;
 }
 
-int bt_register_declaration(GQuark name, struct declaration *declaration,
+int bt_register_declaration(GQuark name, struct bt_declaration *declaration,
                struct declaration_scope *scope)
 {
        if (!name)
                struct declaration_scope *scope)
 {
        if (!name)
@@ -279,12 +279,12 @@ int bt_register_field_definition(GQuark field_name, struct bt_definition *defini
        return 0;
 }
 
        return 0;
 }
 
-void bt_declaration_ref(struct declaration *declaration)
+void bt_declaration_ref(struct bt_declaration *declaration)
 {
        declaration->ref++;
 }
 
 {
        declaration->ref++;
 }
 
-void bt_declaration_unref(struct declaration *declaration)
+void bt_declaration_unref(struct bt_declaration *declaration)
 {
        if (!declaration)
                return;
 {
        if (!declaration)
                return;
index ed2955031786ad3087cdf10fe9f572f404908b31..1f0dc6aafa37ab187c8f97f112c1fd15b6a2d44f 100644 (file)
@@ -32,7 +32,7 @@
 #include <errno.h>
 
 static
 #include <errno.h>
 
 static
-struct bt_definition *_variant_definition_new(struct declaration *declaration,
+struct bt_definition *_variant_definition_new(struct bt_declaration *declaration,
                                struct definition_scope *parent_scope,
                                GQuark field_name, int index,
                                const char *root_name);
                                struct definition_scope *parent_scope,
                                GQuark field_name, int index,
                                const char *root_name);
@@ -50,7 +50,7 @@ int bt_variant_rw(struct bt_stream_pos *ppos, struct bt_definition *definition)
 }
 
 static
 }
 
 static
-void _untagged_variant_declaration_free(struct declaration *declaration)
+void _untagged_variant_declaration_free(struct bt_declaration *declaration)
 {
        struct declaration_untagged_variant *untagged_variant_declaration =
                container_of(declaration, struct declaration_untagged_variant, p);
 {
        struct declaration_untagged_variant *untagged_variant_declaration =
                container_of(declaration, struct declaration_untagged_variant, p);
@@ -73,7 +73,7 @@ struct declaration_untagged_variant *bt_untagged_bt_variant_declaration_new(
                                      struct declaration_scope *parent_scope)
 {
        struct declaration_untagged_variant *untagged_variant_declaration;
                                      struct declaration_scope *parent_scope)
 {
        struct declaration_untagged_variant *untagged_variant_declaration;
-       struct declaration *declaration;
+       struct bt_declaration *declaration;
 
        untagged_variant_declaration = g_new(struct declaration_untagged_variant, 1);
        declaration = &untagged_variant_declaration->p;
 
        untagged_variant_declaration = g_new(struct declaration_untagged_variant, 1);
        declaration = &untagged_variant_declaration->p;
@@ -93,7 +93,7 @@ struct declaration_untagged_variant *bt_untagged_bt_variant_declaration_new(
 }
 
 static
 }
 
 static
-void _variant_declaration_free(struct declaration *declaration)
+void _variant_declaration_free(struct bt_declaration *declaration)
 {
        struct declaration_variant *variant_declaration =
                container_of(declaration, struct declaration_variant, p);
 {
        struct declaration_variant *variant_declaration =
                container_of(declaration, struct declaration_variant, p);
@@ -107,7 +107,7 @@ struct declaration_variant *
        bt_variant_declaration_new(struct declaration_untagged_variant *untagged_variant, const char *tag)
 {
        struct declaration_variant *variant_declaration;
        bt_variant_declaration_new(struct declaration_untagged_variant *untagged_variant, const char *tag)
 {
        struct declaration_variant *variant_declaration;
-       struct declaration *declaration;
+       struct bt_declaration *declaration;
 
        variant_declaration = g_new(struct declaration_variant, 1);
        declaration = &variant_declaration->p;
 
        variant_declaration = g_new(struct declaration_variant, 1);
        declaration = &variant_declaration->p;
@@ -173,7 +173,7 @@ int check_enum_tag(struct definition_variant *variant,
 
 static
 struct bt_definition *
 
 static
 struct bt_definition *
-       _variant_definition_new(struct declaration *declaration,
+       _variant_definition_new(struct bt_declaration *declaration,
                                struct definition_scope *parent_scope,
                                GQuark field_name, int index,
                                const char *root_name)
                                struct definition_scope *parent_scope,
                                GQuark field_name, int index,
                                const char *root_name)
@@ -259,7 +259,7 @@ void _variant_definition_free(struct bt_definition *definition)
 
 void bt_untagged_variant_declaration_add_field(struct declaration_untagged_variant *untagged_variant_declaration,
                            const char *field_name,
 
 void bt_untagged_variant_declaration_add_field(struct declaration_untagged_variant *untagged_variant_declaration,
                            const char *field_name,
-                           struct declaration *field_declaration)
+                           struct bt_declaration *field_declaration)
 {
        struct declaration_field *field;
        unsigned long index;
 {
        struct declaration_field *field;
        unsigned long index;
This page took 0.051234 seconds and 4 git commands to generate.