summaryrefslogtreecommitdiff
path: root/giscanner/maintransformer.py
diff options
context:
space:
mode:
authorTomeu Vizoso <tomeu.vizoso@collabora.co.uk>2011-01-20 16:34:45 +0100
committerTomeu Vizoso <tomeu.vizoso@collabora.co.uk>2011-01-21 10:47:31 +0100
commit751a9fa80a31c01cd26ff35f0e66f428372ea88b (patch)
treee80f462250759a4586adf26f75d3e54613804996 /giscanner/maintransformer.py
parent86262fbb749bf4c04aef2306cd20282555d8b935 (diff)
downloadgobject-introspection-751a9fa80a31c01cd26ff35f0e66f428372ea88b.tar.gz
Preserve the c:type of array elements
So the element type has the correct is_pointer flag https://bugzilla.gnome.org/show_bug.cgi?id=638929
Diffstat (limited to 'giscanner/maintransformer.py')
-rw-r--r--giscanner/maintransformer.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/giscanner/maintransformer.py b/giscanner/maintransformer.py
index 8ada9296..ee945546 100644
--- a/giscanner/maintransformer.py
+++ b/giscanner/maintransformer.py
@@ -325,8 +325,9 @@ usage is void (*_gtk_reserved1)(void);"""
# We're assuming here that Foo* with an (array) annotation
# and no (element-type) means array of Foo
element_type_node = node.type.clone()
- # Explicitly erase ctype since it's no longer valid
- element_type_node.ctype = None
+ # The element's ctype is the array's dereferenced
+ if element_type_node.ctype.endswith('*'):
+ element_type_node.ctype = element_type_node.ctype[:-1]
if isinstance(node.type, ast.Array):
array_type = node.type.array_type