-extern int bt_ctf_field_type_structure_get_field(
- struct bt_ctf_field_type *struct_field_type,
- const char **field_name, struct bt_ctf_field_type **field_type,
- int index);
+static inline
+int bt_field_type_structure_get_field_by_index(
+ struct bt_field_type *struct_field_type,
+ const char **field_name, struct bt_field_type **field_type,
+ uint64_t index)
+{
+ int ret = bt_field_type_structure_borrow_field_by_index(
+ struct_field_type, field_name, field_type, index);
+
+ if (ret == 0 && field_type) {
+ bt_get(*field_type);
+ }
+
+ return ret;
+}
+
+extern
+struct bt_field_type *bt_field_type_structure_borrow_field_type_by_name(
+ struct bt_field_type *struct_field_type,
+ const char *field_name);