summaryrefslogtreecommitdiff
path: root/giscanner/transformer.py
diff options
context:
space:
mode:
authorOwen W. Taylor <otaylor@fishsoup.net>2009-12-22 11:10:33 -0500
committerColin Walters <walters@verbum.org>2010-02-12 16:12:27 -0500
commit965ff4c6583fd1bab80858ecde419bfc20ad540b (patch)
tree630423ecf568dc3b09f468cc36f0743d37bae9d1 /giscanner/transformer.py
parentefc88ed30e212cc0cca9fbb57b245e4a02a3d136 (diff)
downloadgobject-introspection-965ff4c6583fd1bab80858ecde419bfc20ad540b.tar.gz
Fix glib:error-quark scanning for unregistered enum types
The enumeration type for an error might not be introspected and registered with GObject (this is, in particular, true for the errors in GLib itself). So, as a fallback search, through all enum types in the module. Add a special case for the aberrant GIOErrorEnum and a warning if resolution completely fails. https://bugzilla.gnome.org/show_bug.cgi?id=602512
Diffstat (limited to 'giscanner/transformer.py')
-rw-r--r--giscanner/transformer.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/giscanner/transformer.py b/giscanner/transformer.py
index e75b52e5..bbcabe45 100644
--- a/giscanner/transformer.py
+++ b/giscanner/transformer.py
@@ -692,3 +692,8 @@ class Transformer(object):
else:
break
return type_name
+
+ def iter_enums(self):
+ for node in self._namespace.nodes:
+ if isinstance(node, Enum):
+ yield node