[gobject-introspection] ast: Track enum members by symbol
- From: Jasper St. Pierre <jstpierre src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gobject-introspection] ast: Track enum members by symbol
- Date: Sat, 2 Feb 2013 00:47:29 +0000 (UTC)
commit 55815545eb163b7046fbe226dff946354f3c52d0
Author: Jasper St. Pierre <jstpierre mecheye net>
Date: Wed Jan 30 09:57:18 2013 -0500
ast: Track enum members by symbol
The doctool eventually wants to parse inline references to
constant values like %GTK_TEXT_DIRECTION_LTR, so we need to
have a way to look up the original symbol value for an enum
member.
https://bugzilla.gnome.org/show_bug.cgi?id=693040
giscanner/ast.py | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
---
diff --git a/giscanner/ast.py b/giscanner/ast.py
index e5c403e..7076a84 100644
--- a/giscanner/ast.py
+++ b/giscanner/ast.py
@@ -415,6 +415,9 @@ but adds it to things like ctypes, symbols, and type_names.
continue
fn.namespace = self
self.symbols[fn.symbol] = fn
+ for member in node.members:
+ member.namespace = self
+ self.symbols[member.symbol] = member
if hasattr(node, 'ctype'):
self.ctypes[node.ctype] = node
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]