summaryrefslogtreecommitdiff
path: root/girepository/giroffsets.c
diff options
context:
space:
mode:
authorColin Walters <walters@src.gnome.org>2009-02-02 16:31:06 +0000
committerColin Walters <walters@src.gnome.org>2009-02-02 16:31:06 +0000
commite165360bf91fbd34507e84cffc9283b8b171401b (patch)
tree765f0e4db4fc104f724b61aba721cfdee5030f5d /girepository/giroffsets.c
parent34c6fe51cd8d669d95aef52bda9abbc38257bca9 (diff)
downloadgobject-introspection-e165360bf91fbd34507e84cffc9283b8b171401b.tar.gz
Bug 569408, Bug 568680 - Scanner misses fields (at least in GObject.Object)
The scanner misses all fields of the GObject struct -- there are no <field> children of the <class> element for GObject in the GIR. This of course yields wrong field offsets for all derived objects. svn path=/trunk/; revision=1079
Diffstat (limited to 'girepository/giroffsets.c')
-rw-r--r--girepository/giroffsets.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/girepository/giroffsets.c b/girepository/giroffsets.c
index f224e693..cc56d0bc 100644
--- a/girepository/giroffsets.c
+++ b/girepository/giroffsets.c
@@ -357,8 +357,9 @@ compute_struct_field_offsets (GIrNode *node,
}
else if (member->type == G_IR_NODE_CALLBACK)
{
- size = ffi_type_pointer.size;
- alignment = ffi_type_pointer.alignment;
+ size = ALIGN (size, ffi_type_pointer.alignment);
+ alignment = MAX (alignment, ffi_type_pointer.alignment);
+ size += ffi_type_pointer.size;
}
}