X-Git-Url: http://git.efficios.com/?p=babeltrace.git;a=blobdiff_plain;f=types%2Fsequence.c;h=bd49d2a6507f116a5f916a423785761e06fd1cb5;hp=ed719bc5d553ef3b34d5125c38dcd771076ec1a9;hb=f7bbd50246fde81a4ef90fa6bd78e441fccdbb40;hpb=64fa3fec6c28f1d077812b4bfa06ae73b0f5999d diff --git a/types/sequence.c b/types/sequence.c index ed719bc5..bd49d2a6 100644 --- a/types/sequence.c +++ b/types/sequence.c @@ -20,6 +20,7 @@ #include #include +#include #include static @@ -59,13 +60,18 @@ int sequence_rw(struct stream_pos *pos, struct definition *definition) str = g_string_new(""); g_string_printf(str, "[%" PRIu64 "]", i); - (void) g_string_free(str, TRUE); name = g_quark_from_string(str->str); + (void) g_string_free(str, TRUE); field = (struct definition **) &g_ptr_array_index(sequence_definition->elems, i); *field = sequence_declaration->elem->definition_new(sequence_declaration->elem, sequence_definition->p.scope, name, i, NULL); + } + for (i = 0; i < len; i++) { + struct definition **field; + + field = (struct definition **) &g_ptr_array_index(sequence_definition->elems, i); ret = generic_rw(pos, *field); if (ret) return ret;