summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTomeu Vizoso <tomeu.vizoso@collabora.co.uk>2010-06-09 10:26:26 +0200
committerJohan Dahlin <johan@gnome.org>2010-06-09 08:38:04 -0300
commit1175ebe5d84bec58acc082c3077af138cad1f54e (patch)
treeaaaa9b44b997938788e84d26bea63d14fc9d1b90
parent00f5d36cd2aff9d1264841ee02e132aa03f1407c (diff)
downloadgobject-introspection-1175ebe5d84bec58acc082c3077af138cad1f54e.tar.gz
Allow for methods in GLib
* girepository/gitypelib.c: Don't complain about constructors returning types other than objects or interfaces if the container type isn't an object or interface itself. * giscanner/glibtransformer.py: Don't give up parsing a method just because it's in the GLib namespace. https://bugzilla.gnome.org/show_bug.cgi?id=621069
-rw-r--r--girepository/gitypelib.c9
-rw-r--r--giscanner/glibtransformer.py3
2 files changed, 6 insertions, 6 deletions
diff --git a/girepository/gitypelib.c b/girepository/gitypelib.c
index 1b3f882e..6aa3077c 100644
--- a/girepository/gitypelib.c
+++ b/girepository/gitypelib.c
@@ -832,13 +832,16 @@ validate_function_blob (ValidateContext *ctx,
iface_type = get_type_blob (typelib, simple, error);
if (!iface_type)
return FALSE;
- if (!(iface_type->tag == GI_TYPE_TAG_INTERFACE))
+ if (iface_type->tag != GI_TYPE_TAG_INTERFACE &&
+ (container_type == BLOB_TYPE_OBJECT ||
+ container_type == BLOB_TYPE_INTERFACE))
{
g_set_error (error,
G_TYPELIB_ERROR,
G_TYPELIB_ERROR_INVALID,
- "Invalid return type %d for constructor",
- iface_type->tag);
+ "Invalid return type '%s' for constructor '%s'",
+ g_type_tag_to_string (iface_type->tag),
+ get_string_nofail (typelib, blob->symbol));
return FALSE;
}
}
diff --git a/giscanner/glibtransformer.py b/giscanner/glibtransformer.py
index 2e45b134..324a444f 100644
--- a/giscanner/glibtransformer.py
+++ b/giscanner/glibtransformer.py
@@ -487,9 +487,6 @@ class GLibTransformer(object):
# already
if func.symbol.endswith('_get_type'):
return None
- if self._namespace_name == 'GLib':
- # No GObjects in GLib
- return None
if not is_method:
target_arg = func.retval