summaryrefslogtreecommitdiff
path: root/giscanner
diff options
context:
space:
mode:
authorTomasz Miąsko <tomasz.miasko@gmail.com>2019-01-06 00:00:00 +0000
committerTomasz Miąsko <tomasz.miasko@gmail.com>2019-01-06 21:05:15 +0100
commit1f0965e379035be51ae96d5761358ec088fb3421 (patch)
tree454e0c58f273dd0f4cba002bfc3cdfb88e267942 /giscanner
parent90121df20ddf18afdb1c25212035748ff54519c5 (diff)
downloadgobject-introspection-1f0965e379035be51ae96d5761358ec088fb3421.tar.gz
scanner: Remove incorrect c:type from fields with array type
Neither `_create_source_type` nor `_create_complete_source_type` actually support fixed size arrays, so previously generated C types were incorrect. Remove C types from array fields instead of producing incorrect ones. Fixes issue #145.
Diffstat (limited to 'giscanner')
-rw-r--r--giscanner/transformer.py13
1 files changed, 1 insertions, 12 deletions
diff --git a/giscanner/transformer.py b/giscanner/transformer.py
index a74cb6ba..1b5c80eb 100644
--- a/giscanner/transformer.py
+++ b/giscanner/transformer.py
@@ -565,20 +565,9 @@ raise ValueError."""
ftype = ast.Array(None, synthesized_type, complete_ctype=complete_ctype)
else:
ctype = self._create_source_type(source_type)
- canonical_ctype = self._canonicalize_ctype(ctype)
- if canonical_ctype[-1] == '*':
- derefed_name = canonical_ctype[:-1]
- else:
- derefed_name = canonical_ctype
- if complete_ctype[-1] == '*':
- derefed_complete_ctype = complete_ctype[:-1]
- else:
- derefed_complete_ctype = complete_ctype
from_ctype = self.create_type_from_ctype_string(ctype,
complete_ctype=complete_ctype)
- ftype = ast.Array(None, from_ctype,
- ctype=derefed_name,
- complete_ctype=derefed_complete_ctype)
+ ftype = ast.Array(None, from_ctype)
child_list = list(symbol.base_type.child_list)
ftype.zeroterminated = False
if child_list: