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) {
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));