summaryrefslogtreecommitdiff
path: root/giscanner
diff options
context:
space:
mode:
authorColin Walters <walters@verbum.org>2012-07-08 20:36:50 -0400
committerColin Walters <walters@verbum.org>2012-07-08 20:36:50 -0400
commitf77cfc4275b1fba4f9fedea6e40b00e0ebbe142c (patch)
treeabb7eef652d30ef0d0cefe8e642b054c6dfec4bf /giscanner
parent3943988d5addbea4603f9b4ee5103c604d03e8f4 (diff)
downloadgobject-introspection-f77cfc4275b1fba4f9fedea6e40b00e0ebbe142c.tar.gz
scanner: Ensure "complete_ctype" patch doesn't throw an exception for anonymous unions
The previous patch introduced a regression where we would crash on encountering an anonymous union. Work around this by just writing out 'gpointer' in this case, and add a regression test.
Diffstat (limited to 'giscanner')
-rw-r--r--giscanner/transformer.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/giscanner/transformer.py b/giscanner/transformer.py
index 91d00afc..d6320d84 100644
--- a/giscanner/transformer.py
+++ b/giscanner/transformer.py
@@ -449,6 +449,8 @@ raise ValueError."""
CTYPE_UNION,
CTYPE_ENUM]:
value = source_type.name
+ if not value:
+ value = 'gpointer'
if const:
value = 'const ' + value
if volatile: