summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorScott D Phillips <scott.d.phillips@intel.com>2016-05-04 17:39:26 -0700
committerColin Walters <walters@verbum.org>2016-05-08 17:40:13 -0400
commit1dabcc4c17f2eb98ed38eaf4c022d43f29965a61 (patch)
treedb79b237d6732d4339c48201e00ef8584c7bf126
parent9f1f2f5efd008aba9e92edd3a44d431b84fa5174 (diff)
downloadgobject-introspection-1dabcc4c17f2eb98ed38eaf4c022d43f29965a61.tar.gz
ast: Avoid a crash with anonymous structs
We enabled anonymous unions earlier, this is a bugfix to enable anonymous structs. https://bugzilla.gnome.org/show_bug.cgi?id=766011
-rw-r--r--giscanner/ast.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/giscanner/ast.py b/giscanner/ast.py
index 99bbd3e1..7a2b5b15 100644
--- a/giscanner/ast.py
+++ b/giscanner/ast.py
@@ -569,7 +569,8 @@ class Node(Annotated):
(namespace, name) pair. When combined with a ., this is called a
GIName. It's possible for nodes to contain or point to other nodes."""
- c_name = property(lambda self: self.namespace.name + self.name)
+ c_name = property(lambda self: self.namespace.name + self.name if self.namespace else
+ self.name)
gi_name = property(lambda self: '%s.%s' % (self.namespace.name, self.name))
def __init__(self, name=None):