Namespace the struct trace_descriptor
[babeltrace.git] / formats / ctf / events.c
index 3660c04812aada2749e3b0d1ce3c6e3357e46746..d9460b169e98e68ebb0c0f6a9630b4f563f4d522 100644 (file)
@@ -106,7 +106,7 @@ const struct definition *bt_ctf_get_field(const struct bt_ctf_event *ctf_event,
        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
@@ -115,7 +115,7 @@ const struct definition *bt_ctf_get_field(const struct bt_ctf_event *ctf_event,
                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) {
@@ -168,7 +168,7 @@ const char *bt_ctf_event_name(const struct bt_ctf_event *ctf_event)
 
 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));
@@ -613,7 +613,7 @@ int bt_ctf_get_event_decl_list(int handle_id, struct bt_context *ctx,
                unsigned int *count)
 {
        struct bt_trace_handle *handle;
-       struct trace_descriptor *td;
+       struct bt_trace_descriptor *td;
        struct ctf_trace *tin;
 
        if (!ctx || !list || !count)
This page took 0.022827 seconds and 4 git commands to generate.