X-Git-Url: http://git.efficios.com/?p=babeltrace.git;a=blobdiff_plain;f=types%2Fsequence.c;h=9d84d0eece59e8a9d4a1f878e5da8cb5296a7818;hp=e769b81e4e5d1776ead3c748a8acf11d7c8cf5a9;hb=05628561ca57ff5d269571a72a12cb86854c5f70;hpb=6ee5115efee00adab0c8f384bc9c0f38fed8a84e diff --git a/types/sequence.c b/types/sequence.c index e769b81e..9d84d0ee 100644 --- a/types/sequence.c +++ b/types/sequence.c @@ -59,6 +59,7 @@ void _sequence_type_free(struct type *type) struct type_sequence *sequence_type = container_of(type, struct type_sequence, p); + free_type_scope(sequence_type->scope); type_unref(&sequence_type->len_type->p); type_unref(sequence_type->elem); g_free(sequence_type); @@ -66,7 +67,8 @@ void _sequence_type_free(struct type *type) struct type_sequence * sequence_type_new(const char *name, struct type_integer *len_type, - struct type *elem_type) + struct type *elem_type, + struct type_scope *parent_scope) { struct type_sequence *sequence_type; struct type *type; @@ -78,6 +80,8 @@ struct type_sequence * sequence_type->len_type = len_type; type_ref(elem_type); sequence_type->elem = elem_type; + sequence_type->scope = new_type_scope(parent_scope); + type->id = CTF_TYPE_SEQUENCE; type->name = g_quark_from_string(name); type->alignment = max(len_type->p.alignment, elem_type->alignment); type->copy = sequence_copy;