ir: add bt_ctf_field_get_type_id()
[babeltrace.git] / include / babeltrace / ctf-ir / event-fields.h
index 2b682bb649d90c28e53f7c21d507b49628cbb31a..a1e1351aae2dc648b510503d20133117917fff7e 100644 (file)
@@ -352,6 +352,20 @@ extern int bt_ctf_field_string_append_len(
 extern struct bt_ctf_field_type *bt_ctf_field_get_type(
                struct bt_ctf_field *field);
 
+/*
+ * bt_ctf_field_get_type_id: get a field's ctf_type_id.
+ *
+ * This is a helper function which avoids a call to
+ * bt_ctf_field_get_type(), followed by a call to
+ * bt_ctf_field_type_get_type_id(), followed by a call to
+ * bt_ctf_put().
+ *
+ * @param field Field instance.
+ *
+ * Returns the field's ctf_type_id, CTF_TYPE_UNKNOWN on error.
+ */
+extern enum ctf_type_id bt_ctf_field_get_type_id(struct bt_ctf_field *field);
+
 /*
  * bt_ctf_field_copy: get a field's deep copy.
  *
This page took 0.022792 seconds and 4 git commands to generate.