[gobject-introspection] ast: Fall back to the namespace for the parent of a Node
- From: Jasper St. Pierre <jstpierre src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gobject-introspection] ast: Fall back to the namespace for the parent of a Node
- Date: Sat, 16 Feb 2013 00:54:45 +0000 (UTC)
commit 50e99b62d6b028faeeaf6af3af6c5ef51412f3ec
Author: Jasper St. Pierre <jstpierre mecheye net>
Date: Fri Feb 15 06:31:49 2013 -0500
ast: Fall back to the namespace for the parent of a Node
https://bugzilla.gnome.org/show_bug.cgi?id=693876
giscanner/ast.py | 11 +++++++++++
1 files changed, 11 insertions(+), 0 deletions(-)
---
diff --git a/giscanner/ast.py b/giscanner/ast.py
index 3cf99dd..d0784c3 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."""
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]