[gobject-introspection/wip/docs: 6/7] docwriter: Support formatting of types without c:types



commit eb9db6e253a91150c6cf62dfc1fa34b034c4b5e7
Author: Jasper St. Pierre <jstpierre mecheye net>
Date:   Sun Feb 3 08:15:28 2013 -0500

    docwriter: Support formatting of types without c:types
    
    This can happen for properties/signals.

 giscanner/docwriter.py |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)
---
diff --git a/giscanner/docwriter.py b/giscanner/docwriter.py
index ddd0e6e..8a03aef 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)):


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]