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>
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;
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 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);
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;
}
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;
}
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;
}
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;
}
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);
}
-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;
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;
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;
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;
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;
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;
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;
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)
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);
}
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 declaration *nested_declaration,
+ struct bt_declaration *nested_declaration,
struct ctf_trace *trace)
{
/*
*field_name = 0;
return nested_declaration;
} else {
- struct declaration *declaration;
+ struct bt_declaration *declaration;
struct ctf_node *first;
/* TYPEDEC_NESTED */
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,
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,
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,
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;
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,
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,
}
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,
}
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,
}
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,
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;
}
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 declaration *declaration;
+ struct bt_declaration *declaration;
char *str_c;
int ret;
GQuark id_q;
}
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)
{
}
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)
{
}
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)
{
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)
}
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__);
}
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__);
}
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__);
}
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__);
}
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__);
}
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__);
break;
case NODE_TYPE_SPECIFIER_LIST:
{
- struct declaration *declaration;
+ struct bt_declaration *declaration;
/*
* Just add the type specifier to the root scope
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);
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);
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) {
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) {
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);
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);
#endif
struct bt_definition;
-struct declaration;
+struct bt_declaration;
struct bt_ctf_event;
struct bt_ctf_event_decl;
struct bt_ctf_field_decl;
* 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
*/
-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
*/
-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
* 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
*/
-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
*/
-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
*/
-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
*/
-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
*/
-int bt_ctf_get_array_len(const struct declaration *decl);
+int bt_ctf_get_array_len(const struct bt_declaration *decl);
/*
* Field access functions
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.
*/
- void (*declaration_free)(struct declaration *declaration);
+ void (*declaration_free)(struct bt_declaration *declaration);
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 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 */
* 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;
};
struct declaration_float {
- struct declaration p;
+ struct bt_declaration p;
struct declaration_integer *sign;
struct declaration_integer *mantissa;
struct declaration_integer *exp;
};
struct declaration_enum {
- struct declaration p;
+ struct bt_declaration p;
struct declaration_integer *integer_declaration;
struct enum_table table;
};
};
struct declaration_string {
- struct declaration p;
+ struct bt_declaration p;
enum ctf_string_encoding encoding;
};
struct declaration_field {
GQuark name;
- struct declaration *declaration;
+ struct bt_declaration *declaration;
};
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 */
};
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 {
- struct declaration p;
+ struct bt_declaration p;
struct declaration_untagged_variant *untagged_variant;
GArray *tag_name; /* Array of GQuark */
};
};
struct declaration_array {
- struct declaration p;
+ struct bt_declaration p;
size_t len;
- struct declaration *elem;
+ struct bt_declaration *elem;
struct declaration_scope *scope;
};
};
struct declaration_sequence {
- struct declaration p;
+ struct bt_declaration p;
GArray *length_name; /* Array of GQuark */
- struct declaration *elem;
+ struct bt_declaration *elem;
struct declaration_scope *scope;
};
};
int bt_register_declaration(GQuark declaration_name,
- struct declaration *declaration,
+ struct bt_declaration *declaration,
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);
/*
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);
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.
*/
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);
* 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_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);
#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
}
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 *
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 *declaration;
+ struct bt_declaration *declaration;
array_declaration = g_new(struct declaration_array, 1);
declaration = &array_declaration->p;
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_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;
#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);
}
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);
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)
#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);
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);
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;
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)
#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);
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);
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)
#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);
}
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 *
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 *declaration;
+ struct bt_declaration *declaration;
sequence_declaration = g_new(struct declaration_sequence, 1);
declaration = &sequence_declaration->p;
}
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)
#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);
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);
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)
#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);
}
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);
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;
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)
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;
}
static
-struct declaration *
+struct bt_declaration *
bt_lookup_declaration_scope(GQuark declaration_name,
struct declaration_scope *scope)
{
(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 *declaration;
+ struct bt_declaration *declaration;
while (scope) {
declaration = bt_lookup_declaration_scope(declaration_name,
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)
return 0;
}
-void bt_declaration_ref(struct declaration *declaration)
+void bt_declaration_ref(struct bt_declaration *declaration)
{
declaration->ref++;
}
-void bt_declaration_unref(struct declaration *declaration)
+void bt_declaration_unref(struct bt_declaration *declaration)
{
if (!declaration)
return;
#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);
}
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_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;
}
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);
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;
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)
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;