diff options
-rw-r--r-- | giscanner/transformer.py | 2 | ||||
-rw-r--r-- | tests/scanner/Regress-1.0-expected.gir | 16 | ||||
-rw-r--r-- | tests/scanner/regress.h | 11 |
3 files changed, 28 insertions, 1 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: diff --git a/tests/scanner/Regress-1.0-expected.gir b/tests/scanner/Regress-1.0-expected.gir index 0b39bff8..631dd98e 100644 --- a/tests/scanner/Regress-1.0-expected.gir +++ b/tests/scanner/Regress-1.0-expected.gir @@ -55,6 +55,20 @@ and/or use gtk-doc annotations. --> c:type="REGRESS_LONG_STRING_CONSTANT"> <type name="utf8" c:type="gchar*"/> </constant> + <record name="LikeGnomeKeyringPasswordSchema" + c:type="RegressLikeGnomeKeyringPasswordSchema"> + <field name="dummy" writable="1"> + <type name="gint" c:type="int"/> + </field> + <field name="attributes" writable="1"> + <array zero-terminated="0" c:type="gpointer" fixed-size="32"> + <type name="gpointer" c:type="gpointer"/> + </array> + </field> + <field name="dummy2" writable="1"> + <type name="gdouble" c:type="double"/> + </field> + </record> <constant name="Mixed_Case_Constant" value="4423" c:type="REGRESS_Mixed_Case_Constant"> @@ -1474,7 +1488,7 @@ Use with regress_test_obj_emit_sig_with_obj</doc> <type name="GType" c:type="GType"/> </field> <field name="some_union" writable="1"> - <array zero-terminated="0" fixed-size="2"> + <array zero-terminated="0" c:type="gpointer" fixed-size="2"> <type name="TestStructE__some_union__union"/> </array> </field> diff --git a/tests/scanner/regress.h b/tests/scanner/regress.h index 97b9135b..fd937cdd 100644 --- a/tests/scanner/regress.h +++ b/tests/scanner/regress.h @@ -875,4 +875,15 @@ void regress_test_struct_fixed_array_frob (RegressTestStructFixedArray *str); void regress_has_parameter_named_attrs (int foo, gpointer attributes); + +typedef struct { + int dummy; + struct { + const char *name; + guint x; + } attributes[32]; + + double dummy2; +} RegressLikeGnomeKeyringPasswordSchema; + #endif /* __GITESTTYPES_H__ */ |