diff options
author | Jasper St. Pierre <jstpierre@mecheye.net> | 2013-02-15 06:31:49 -0500 |
---|---|---|
committer | Jasper St. Pierre <jstpierre@mecheye.net> | 2013-02-15 19:54:08 -0500 |
commit | 50e99b62d6b028faeeaf6af3af6c5ef51412f3ec (patch) | |
tree | 9daca793d2cd154c1ff983ce7a0324c43aa02253 /giscanner/ast.py | |
parent | 5ac33d8399b14b631971071f47c9973c9f462d95 (diff) | |
download | gobject-introspection-50e99b62d6b028faeeaf6af3af6c5ef51412f3ec.tar.gz |
ast: Fall back to the namespace for the parent of a Node
https://bugzilla.gnome.org/show_bug.cgi?id=693876
Diffstat (limited to 'giscanner/ast.py')
-rw-r--r-- | giscanner/ast.py | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/giscanner/ast.py b/giscanner/ast.py index 3cf99ddd..d0784c38 100644 --- a/giscanner/ast.py +++ b/giscanner/ast.py @@ -527,6 +527,17 @@ GIName. It's possible for nodes to contain or point to other nodes.""" self.name = name self.foreign = False self.file_positions = set() + self._parent = None + + def _get_parent(self): + if self._parent is not None: + return self._parent + else: + return self.namespace + + def _set_parent(self, value): + self._parent = value + parent = property(_get_parent, _set_parent) def create_type(self): """Create a Type object referencing this node.""" |