summaryrefslogtreecommitdiff
path: root/girepository/girnode.h
diff options
context:
space:
mode:
authorDavid Zeuthen <davidz@redhat.com>2010-06-15 10:50:42 -0400
committerDavid Zeuthen <davidz@redhat.com>2010-06-24 11:53:18 -0400
commit751ffa016e410a031028282e63f98a94cc444b7b (patch)
tree4efa01403316b8e761dfd83e1d6f6eae70711c70 /girepository/girnode.h
parent3599c3727d87cb52728a47c31c50484769022745 (diff)
downloadgobject-introspection-751ffa016e410a031028282e63f98a94cc444b7b.tar.gz
Attribute bug-fixes
Rectify an assumption that nodes are ordered according to offset - since this assumption was not true, attributes ended up being not ordered either and the bsearch() when looking up attributes failed mysteriously. Instead of making such assumptions, simply sort the list of nodes we want to extract attributes from. The total attribute size computation was wrong as we didn't properly descend into subnodes. This resulted in memory access violations when writing the typelib (because not enough data was allocated). Instead of having a separate function for this, just include the attribute size in the existing function. See https://bugzilla.gnome.org/show_bug.cgi?id=571548 Signed-off-by: David Zeuthen <davidz@redhat.com>
Diffstat (limited to 'girepository/girnode.h')
-rw-r--r--girepository/girnode.h3
1 files changed, 1 insertions, 2 deletions
diff --git a/girepository/girnode.h b/girepository/girnode.h
index 038a53d7..bd9acd06 100644
--- a/girepository/girnode.h
+++ b/girepository/girnode.h
@@ -51,7 +51,7 @@ struct _GIrTypelibBuild {
GList *modules;
GHashTable *strings;
GHashTable *types;
- GList *offset_ordered_nodes;
+ GList *nodes_with_attributes;
guint32 n_attributes;
guchar *data;
};
@@ -362,7 +362,6 @@ GIrNode * g_ir_node_new (GIrNodeTypeId type);
void g_ir_node_free (GIrNode *node);
guint32 g_ir_node_get_size (GIrNode *node);
guint32 g_ir_node_get_full_size (GIrNode *node);
-guint32 g_ir_node_get_attribute_size (GIrNode *node);
void g_ir_node_build_typelib (GIrNode *node,
GIrNode *parent,
GIrTypelibBuild *build,