summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJasper St. Pierre <jstpierre@mecheye.net>2013-02-03 08:15:28 -0500
committerJasper St. Pierre <jstpierre@mecheye.net>2013-02-11 12:34:53 -0500
commit841a6cfefbb1954ce94c89009be736895b91699c (patch)
tree0fdfb8386dc9e2d242f7fac82dfe189189ab9d6a
parenta10a32a191aa2f0a124ab79ba5906f8f57b69cdd (diff)
downloadgobject-introspection-841a6cfefbb1954ce94c89009be736895b91699c.tar.gz
docwriter: Support formatting of types without c:types
This can happen for properties/signals.
-rw-r--r--giscanner/docwriter.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/giscanner/docwriter.py b/giscanner/docwriter.py
index ddd0e6ea..8a03aefe 100644
--- a/giscanner/docwriter.py
+++ b/giscanner/docwriter.py
@@ -371,8 +371,11 @@ class DocFormatterC(DocFormatter):
return self.format_type(type_.element_type) + '*'
elif type_.ctype is not None:
return type_.ctype
- else:
+ elif type_.target_fundamental:
return type_.target_fundamental
+ else:
+ node = self._transformer.lookup_typenode(type_)
+ return getattr(node, 'ctype')
def format_function_name(self, func):
if isinstance(func, (ast.Function)):