From 3e28196a9861f096a1f93c1c3c122d814731b784 Mon Sep 17 00:00:00 2001 From: Johan Dahlin Date: Wed, 13 Aug 2008 21:44:38 +0000 Subject: [PATCH] Allow get_type to be None, set a get_type for GInitiallyUnowned too. 2008-08-13 Johan Dahlin * girepository/girnode.c (g_ir_node_get_full_size_internal): * girepository/girparser.c (start_class): * giscanner/glibtransformer.py: Allow get_type to be None, set a get_type for GInitiallyUnowned too. svn path=/trunk/; revision=362 --- girnode.c | 4 +++- girparser.c | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/girnode.c b/girnode.c index 7961da37f..3d01ef17e 100644 --- a/girnode.c +++ b/girnode.c @@ -710,7 +710,9 @@ g_ir_node_get_full_size_internal (GIrNode *parent, GIrNode *node) size += ALIGN_VALUE (strlen (iface->parent) + 1, 4); size += ALIGN_VALUE (strlen (node->name) + 1, 4); size += ALIGN_VALUE (strlen (iface->gtype_name) + 1, 4); - size += ALIGN_VALUE (strlen (iface->gtype_init) + 1, 4); + if (iface->gtype_init) + size += ALIGN_VALUE (strlen (iface->gtype_init) + 1, 4); + size += ALIGN_VALUE ( + 1, 4); size += 2 * (n + (n % 2)); for (l = iface->members; l; l = l->next) diff --git a/girparser.c b/girparser.c index 2e875d7fa..209c2d4d0 100644 --- a/girparser.c +++ b/girparser.c @@ -1304,7 +1304,7 @@ start_class (GMarkupParseContext *context, MISSING_ATTRIBUTE (context, error, element_name, "name"); else if (typename == NULL) MISSING_ATTRIBUTE (context, error, element_name, "glib:type-name"); - else if (typeinit == NULL) + else if (typeinit == NULL && strcmp (typename, "GObject")) MISSING_ATTRIBUTE (context, error, element_name, "glib:get-type"); else {