[gobject-introspection] ast: make sure that all nodes have a namespaces
- From: Giovanni Campagna <gcampagna src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gobject-introspection] ast: make sure that all nodes have a namespaces
- Date: Thu, 20 Feb 2014 01:07:50 +0000 (UTC)
commit bd4608b6c761209bca8362bd5524e4dbe781e532
Author: Giovanni Campagna <gcampagna src gnome org>
Date: Wed Feb 19 16:20:56 2014 +0100
ast: make sure that all nodes have a namespaces
Include Fields (which are not really Node, but the doctool wants
to treat as such) and the methods of Boxed nodes.
https://bugzilla.gnome.org/show_bug.cgi?id=724735
giscanner/ast.py | 6 +++++-
1 files changed, 5 insertions(+), 1 deletions(-)
---
diff --git a/giscanner/ast.py b/giscanner/ast.py
index b5b2ad7..b992c11 100644
--- a/giscanner/ast.py
+++ b/giscanner/ast.py
@@ -409,12 +409,15 @@ but adds it to things like ctypes, symbols, and type_names.
self.type_names[node.gtype_name] = node
elif isinstance(node, Function):
self.symbols[node.symbol] = node
- if isinstance(node, (Compound, Class, Interface)):
+ if isinstance(node, (Compound, Class, Interface, Boxed)):
for fn in chain(node.methods, node.static_methods, node.constructors):
if not isinstance(fn, Function):
continue
fn.namespace = self
self.symbols[fn.symbol] = fn
+ if isinstance(node, (Compound, Class, Interface)):
+ for f in node.fields:
+ f.namespace = self
if isinstance(node, (Class, Interface)):
for m in chain(node.signals, node.properties):
m.namespace = self
@@ -916,6 +919,7 @@ class Field(Annotated):
self.bits = bits
self.anonymous_node = anonymous_node
self.private = False
+ self.namespace = None
self.parent = None # a compound
def __cmp__(self, other):
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]