[gobject-introspection] g-ir-doc-tool: Use the array type when rendering [element-type]



commit 773512aef00eb1e4389d5241fa495f2ad50fdb1b
Author: Tomeu Vizoso <tomeu vizoso collabora co uk>
Date:   Sun Aug 14 14:17:33 2011 +0200

    g-ir-doc-tool: Use the array type when rendering [element-type]

 giscanner/docbookwriter.py |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)
---
diff --git a/giscanner/docbookwriter.py b/giscanner/docbookwriter.py
index 443aaa8..31b0699 100644
--- a/giscanner/docbookwriter.py
+++ b/giscanner/docbookwriter.py
@@ -164,7 +164,11 @@ class DocBookFormatter(object):
 
         if hasattr(argument.type, 'element_type') and \
            argument.type.element_type is not None:
-            annotations['element-type'] = argument.type.element_type
+            if isinstance(argument.type.element_type, ast.Array):
+                element_type = argument.type.element_type.array_type
+            else:
+                element_type = argument.type.element_type
+            annotations['element-type'] = element_type
 
         if argument.transfer is not None and argument.transfer != 'none':
             annotations['transfer'] = argument.transfer



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