return ret;
}
+enum ctf_type_id bt_ctf_field_get_type_id(struct bt_ctf_field *field)
+{
+ enum ctf_type_id ret = CTF_TYPE_UNKNOWN;
+
+ if (!field) {
+ goto end;
+ }
+
+ ret = bt_ctf_field_type_get_type_id(field->type);
+end:
+ return ret;
+}
+
struct bt_ctf_field *bt_ctf_field_sequence_get_length(
struct bt_ctf_field *field)
{
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.
*