+ structure_type->fields->len);
+
+ /* Create all fields contained by the structure field. */
+ for (i = 0; i < structure_type->fields->len; i++) {
+ struct bt_field *field;
+ struct structure_field *field_type =
+ g_ptr_array_index(structure_type->fields, i);
+
+ field = bt_field_create(field_type->type);
+ if (!field) {
+ BT_LOGE("Failed to create structure field's member: name=\"%s\", index=%zu",
+ g_quark_to_string(field_type->name), i);
+ bt_field_structure_destroy(&structure->parent);
+ goto end;
+ }
+
+ g_ptr_array_index(structure->fields, i) = field;
+ }
+
+ ret = &structure->parent;
+ BT_LOGD("Created structure field object: addr=%p, ft-addr=%p", ret,
+ type);