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;
cfs = container_of(event->stream, const struct ctf_file_stream,
parent);
trace = cfs->parent.stream_class->trace;
- if (trace->ctx)
- ret = trace->ctx;
+ if (trace->parent.ctx)
+ ret = trace->parent.ctx;
return ret;
}
cfs = container_of(event->stream, const struct ctf_file_stream,
parent);
trace = cfs->parent.stream_class->trace;
- if (trace->handle)
- ret = trace->handle->id;
+ if (trace->parent.handle)
+ ret = trace->parent.handle->id;
return ret;
}
}
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;
gpointer *ret_list = NULL;
GPtrArray *fields_array = NULL;
int ret = 0;
- *count = 0;
if (!event_decl || !list || !count)
return -EINVAL;
+ *count = 0;
switch (scope) {
case BT_EVENT_CONTEXT:
if (event_decl->context_decl) {
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)