[gobject-introspection] docwriter: Support formatting of types without c:types



commit 841a6cfefbb1954ce94c89009be736895b91699c
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]