summaryrefslogtreecommitdiff
path: root/giscanner/maintransformer.py
diff options
context:
space:
mode:
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