summaryrefslogtreecommitdiff
path: root/girepository/girnode.h
diff options
context:
space:
mode:
authorOwen Taylor <otaylor@src.gnome.org>2008-11-11 05:10:36 +0000
committerOwen Taylor <otaylor@src.gnome.org>2008-11-11 05:10:36 +0000
commit7e1e368b9f09835a4c65c3e8ff7780523893180d (patch)
tree549f6f46dec594ee3429cda80d66abbbda85906b /girepository/girnode.h
parent570088cd5548cdc3e13b85b5e900457c3b5a94ea (diff)
downloadgobject-introspection-7e1e368b9f09835a4c65c3e8ff7780523893180d.tar.gz
Bug 560252 - Compute field offsets before writing typelib
girnode.h: Store the total size and alignment for GIrNodeStruct/Boxed/Union. giroffset.c: New file implementing computation of structure field offsets. girnode.c: Compute structure field offsets before writing types into the typelib. docs/typelib-format.txt: Document that a field offset of 0xFFFF means "unknown". Also fix description of the discriminator_offset field for unions. svn path=/trunk/; revision=876
Diffstat (limited to 'girepository/girnode.h')
-rw-r--r--girepository/girnode.h16
1 files changed, 16 insertions, 0 deletions
diff --git a/girepository/girnode.h b/girepository/girnode.h
index bc24a11c..971df6b9 100644
--- a/girepository/girnode.h
+++ b/girepository/girnode.h
@@ -271,6 +271,9 @@ struct _GIrNodeBoxed
gchar *gtype_name;
gchar *gtype_init;
+
+ gint alignment;
+ gint size;
GList *members;
};
@@ -284,6 +287,9 @@ struct _GIrNodeStruct
gchar *gtype_name;
gchar *gtype_init;
+
+ gint alignment;
+ gint size;
GList *members;
};
@@ -300,6 +306,9 @@ struct _GIrNodeUnion
gchar *gtype_name;
gchar *gtype_init;
+ gint alignment;
+ gint size;
+
gint discriminator_offset;
GIrNodeType *discriminator_type;
};
@@ -348,6 +357,13 @@ gboolean g_ir_find_node (GIrModule *module,
GIrNode **node_out,
GIrModule **module_out);
+/* In giroffsets.c */
+
+void g_ir_node_compute_offsets (GIrNode *node,
+ GIrModule *module,
+ GList *modules);
+
+
G_END_DECLS
#endif /* __G_IR_NODE_H__ */