summaryrefslogtreecommitdiff
path: root/giscanner/girparser.py
diff options
context:
space:
mode:
authorJasper St. Pierre <jstpierre@mecheye.net>2013-01-30 10:02:41 -0500
committerJasper St. Pierre <jstpierre@mecheye.net>2013-02-01 19:19:50 -0500
commitf027b6841164fc5c712236b3c40a90808e1b7428 (patch)
tree7d69b3c9360cee0fd6d2e4dc2961488c198e4cda /giscanner/girparser.py
parent55815545eb163b7046fbe226dff946354f3c52d0 (diff)
downloadgobject-introspection-f027b6841164fc5c712236b3c40a90808e1b7428.tar.gz
ast: Track enum/bitfield member parents
We need this for the doctool so that we can link to an enum definition when we reference one of the member values. https://bugzilla.gnome.org/show_bug.cgi?id=693040
Diffstat (limited to 'giscanner/girparser.py')
-rw-r--r--giscanner/girparser.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/giscanner/girparser.py b/giscanner/girparser.py
index ef915a79..ea8b0d6d 100644
--- a/giscanner/girparser.py
+++ b/giscanner/girparser.py
@@ -581,8 +581,10 @@ class GIRParser(object):
self._namespace.append(obj)
return
- for member in self._find_children(node, _corens('member')):
- members.append(self._parse_member(member))
+ for member_node in self._find_children(node, _corens('member')):
+ member = self._parse_member(member_node)
+ member.parent = obj
+ members.append(member)
for func_node in self._find_children(node, _corens('function')):
func = self._parse_function_common(func_node, ast.Function)
obj.static_methods.append(func)