if (!ctf_event || !scope || !field)
return NULL;
- def = lookup_definition(scope, field);
+ def = bt_lookup_definition(scope, field);
/*
* optionally a field can have an underscore prefix, try
* to lookup the field with this prefix if it failed
field_underscore = g_new(char, strlen(field) + 2);
field_underscore[0] = '_';
strcpy(&field_underscore[1], field);
- def = lookup_definition(scope, field_underscore);
+ def = bt_lookup_definition(scope, field_underscore);
g_free(field_underscore);
}
if (bt_ctf_field_type(bt_ctf_get_decl_from_def(def)) == CTF_TYPE_VARIANT) {
struct definition_sequence *sequence_definition;
sequence_definition = container_of(field,
struct definition_sequence, p);
- ret = sequence_index(sequence_definition, index);
+ ret = bt_sequence_index(sequence_definition, index);
}
return ret;
}
const char *bt_ctf_field_name(const struct definition *def)
{
- if (!def)
+ if (!def || !def->name)
return NULL;
return rem_(g_quark_to_string(def->name));
char *ret = NULL;
if (field && bt_ctf_field_type(bt_ctf_get_decl_from_def(field)) == CTF_TYPE_STRING)
- ret = get_string(field);
+ ret = bt_get_string(field);
else
bt_ctf_field_set_error(-EINVAL);