remember last current field in variant
authorMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Sat, 26 Feb 2011 20:14:09 +0000 (15:14 -0500)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Sat, 26 Feb 2011 20:14:09 +0000 (15:14 -0500)
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
types/variant.c

index 0cf0ca6860de0434bbeac35be9d910297d5da03b..76573085d72510d547348ba2e533e968c0c03385 100644 (file)
@@ -243,5 +243,6 @@ variant_type_get_current_field(struct type_variant *variant)
        tag = g_array_index(tag_array, GQuark, 0);
        index = (unsigned long) g_hash_table_lookup(variant_class->fields_by_tag,
                                                    (gconstpointer) (unsigned long) tag);
-       return &g_array_index(variant_class->fields, struct field, index);
+       variant->current_field = &g_array_index(variant_class->fields, struct field, index);
+       return variant->current_field;
 }
This page took 0.033063 seconds and 4 git commands to generate.