summaryrefslogtreecommitdiff
path: root/giscanner
diff options
context:
space:
mode:
authorColin Walters <walters@verbum.org>2013-10-30 15:24:06 +0000
committerColin Walters <walters@verbum.org>2013-10-30 17:23:22 -0400
commit6b44b271fb27dc46175b58fbd7e1f36ac0419943 (patch)
treece1d8e7424dd178ab1c7f35a074f460dd1834fc0 /giscanner
parenta22fde8ba32aa0614371e4e3a8e6f5e755ae28ad (diff)
downloadgobject-introspection-6b44b271fb27dc46175b58fbd7e1f36ac0419943.tar.gz
scanner: Don't barf on anonymous unions
I'd like to be able to use this inside GTK+. See: https://bugzilla.gnome.org/show_bug.cgi?id=711153 https://bugzilla.gnome.org/show_bug.cgi?id=711157
Diffstat (limited to 'giscanner')
-rw-r--r--giscanner/maintransformer.py1
1 files changed, 1 insertions, 0 deletions
diff --git a/giscanner/maintransformer.py b/giscanner/maintransformer.py
index 67cbec83..c107beed 100644
--- a/giscanner/maintransformer.py
+++ b/giscanner/maintransformer.py
@@ -107,6 +107,7 @@ class MainTransformer(object):
if isinstance(node, (ast.Class, ast.Interface, ast.Record, ast.Union)):
for field in node.fields:
if (field
+ and field.name is not None
and field.name.startswith('_')
and field.anonymous_node is not None
and isinstance(field.anonymous_node, ast.Callback)):