summaryrefslogtreecommitdiff
path: root/girepository/giroffsets.c
diff options
context:
space:
mode:
authorTomeu Vizoso <tomeu@sugarlabs.org>2009-11-09 19:17:23 +0100
committerTomeu Vizoso <tomeu@sugarlabs.org>2009-11-11 13:55:00 +0100
commitf8693bda3775f6339f38a17c037ac7bc4a4cc3f7 (patch)
tree89456982ed5b6e8e5850a7c05f55a50f3be0c5fa /girepository/giroffsets.c
parent3715b02198c9efc34d70f489d4e55a39456d8f99 (diff)
downloadgobject-introspection-f8693bda3775f6339f38a17c037ac7bc4a4cc3f7.tar.gz
Implement callbacks as part of struct fields. Fixes #557383
gir: embed <callback> inside <field> typelib: if a field contains a callback, store it just after the FieldBlob girepository API: no additions
Diffstat (limited to 'girepository/giroffsets.c')
-rw-r--r--girepository/giroffsets.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/girepository/giroffsets.c b/girepository/giroffsets.c
index d8347464..8354bc51 100644
--- a/girepository/giroffsets.c
+++ b/girepository/giroffsets.c
@@ -303,7 +303,14 @@ get_field_size_alignment (GIrNodeField *field,
who = g_strdup_printf ("field %s.%s.%s", module->name, parent_node->name, ((GIrNode *)field)->name);
- success = get_type_size_alignment (field->type, module, modules, size, alignment, who);
+ if (field->callback)
+ {
+ *size = ffi_type_pointer.size;
+ *alignment = ffi_type_pointer.alignment;
+ success = TRUE;
+ }
+ else
+ success = get_type_size_alignment (field->type, module, modules, size, alignment, who);
g_free (who);
return success;