summaryrefslogtreecommitdiff
path: root/giscanner/girwriter.py
diff options
context:
space:
mode:
authorKrzesimir Nowak <qdlacz@gmail.com>2012-07-04 22:52:02 +0200
committerColin Walters <walters@verbum.org>2012-07-07 17:13:40 -0400
commit3943988d5addbea4603f9b4ee5103c604d03e8f4 (patch)
treee5ca09e5c92ad4b1215d8e37ebaa071064cd60e6 /giscanner/girwriter.py
parent09fe4ca9b3e816f87698761f4b66bc2d0c25e4e0 (diff)
downloadgobject-introspection-3943988d5addbea4603f9b4ee5103c604d03e8f4.tar.gz
giscanner: Write detailed information in "type" tag's "c:type" attribute.
That is - write also type qualifiers (const and volatile here). Update existing tests and add a new struct to regress.h having members with type qualifiers. https://bugzilla.gnome.org/show_bug.cgi?id=656445
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 bfe82a85..cb13d21f 100644
--- a/giscanner/girwriter.py
+++ b/giscanner/girwriter.py
@@ -272,7 +272,9 @@ and/or use gtk-doc annotations. ''')
def _write_type(self, ntype, relation=None, function=None):
assert isinstance(ntype, ast.Type), ntype
attrs = []
- if ntype.ctype:
+ if ntype.complete_ctype:
+ attrs.append(('c:type', ntype.complete_ctype))
+ elif ntype.ctype:
attrs.append(('c:type', ntype.ctype))
if isinstance(ntype, ast.Varargs):
with self.tagcontext('varargs', []):