+ struct declaration_sequence *sequence_declaration;
+ struct bt_declaration *declaration;
+
+ sequence_declaration = g_new(struct declaration_sequence, 1);
+ declaration = &sequence_declaration->p;
+
+ sequence_declaration->length_name = g_array_new(FALSE, TRUE, sizeof(GQuark));
+ bt_append_scope_path(length, sequence_declaration->length_name);
+
+ bt_declaration_ref(elem_declaration);
+ sequence_declaration->elem = elem_declaration;
+ sequence_declaration->scope = bt_new_declaration_scope(parent_scope);
+ declaration->id = BT_CTF_TYPE_ID_SEQUENCE;
+ declaration->alignment = elem_declaration->alignment;
+ declaration->declaration_free = _sequence_declaration_free;
+ declaration->definition_new = _sequence_definition_new;
+ declaration->definition_free = _sequence_definition_free;
+ declaration->ref = 1;
+ return sequence_declaration;
+}
+
+static
+struct bt_definition *_sequence_definition_new(struct bt_declaration *declaration,
+ struct definition_scope *parent_scope,
+ GQuark field_name, int index,
+ const char *root_name)
+{
+ struct declaration_sequence *sequence_declaration =
+ container_of(declaration, struct declaration_sequence, p);
+ struct definition_sequence *sequence;
+ struct bt_definition *len_parent;