summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--giscanner/ast.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/giscanner/ast.py b/giscanner/ast.py
index b5b2ad71..b992c111 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):