[gobject-introspection/wip/transformer] Propagate existing array type when parsing annotation



commit 63f16dae264f9ecc3ae848a957d7bed5fc2e53a8
Author: Colin Walters <walters verbum org>
Date:   Thu Jul 29 19:07:43 2010 -0400

    Propagate existing array type when parsing annotation
    
    Previously we just assumed (array) was a C array

 giscanner/primarytransformer.py |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)
---
diff --git a/giscanner/primarytransformer.py b/giscanner/primarytransformer.py
index 2ce0610..12a03ab 100644
--- a/giscanner/primarytransformer.py
+++ b/giscanner/primarytransformer.py
@@ -212,7 +212,7 @@ class PrimaryTransformer(object):
         def top_combiner(base, *rest):
             """For the top most type, recycle orig_node if possible."""
             if orig_node is not None:
-                if base.target_fundamental:
+                if base.target_fundamental and (not isinstance(base, Array)):
                     orig_node.target_fundamental = base.target_fundamental
                 elif base.target_giname:
                     orig_node.target_giname = base.target_giname
@@ -242,10 +242,10 @@ class PrimaryTransformer(object):
             element_type_node.ctype = None
 
         if isinstance(node.type, Array):
-            name = node.type.array_type
+            array_type = node.type.array_type
         else:
-            name = None
-        container_type = Array(name, element_type_node,
+            array_type = None
+        container_type = Array(array_type, element_type_node,
                                ctype=node.type.ctype,
                                is_const=node.type.is_const)
         if OPT_ARRAY_ZERO_TERMINATED in array_values:



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