summaryrefslogtreecommitdiff
path: root/giscanner/girwriter.py
diff options
context:
space:
mode:
authorJohan Dahlin <johan@gnome.org>2011-09-13 11:57:28 -0300
committerJohan Dahlin <jdahlin@litl.com>2011-09-14 08:04:09 -0300
commitde5401b5c5760c5384f24161373e80bc50fdd442 (patch)
treeb71dde9bb3e9839a7b66df8170b22eefb5967107 /giscanner/girwriter.py
parent128431773deae4545f9f3a6f0085efc082f49c92 (diff)
downloadgobject-introspection-de5401b5c5760c5384f24161373e80bc50fdd442.tar.gz
Add constant value annotation
Add an annotation tag "Value:" which can be used on constants to override the value.
Diffstat (limited to 'giscanner/girwriter.py')
-rw-r--r--giscanner/girwriter.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/giscanner/girwriter.py b/giscanner/girwriter.py
index f1e150df..bfe82a85 100644
--- a/giscanner/girwriter.py
+++ b/giscanner/girwriter.py
@@ -362,7 +362,9 @@ and/or use gtk-doc annotations. ''')
self.write_tag('member', attrs)
def _write_constant(self, constant):
- attrs = [('name', constant.name), ('value', constant.value)]
+ attrs = [('name', constant.name),
+ ('value', constant.value),
+ ('c:type', constant.ctype)]
with self.tagcontext('constant', attrs):
self._write_type(constant.value_type)