diff options
author | Tomasz Miąsko <tomasz.miasko@gmail.com> | 2019-01-06 00:00:00 +0000 |
---|---|---|
committer | Tomasz Miąsko <tomasz.miasko@gmail.com> | 2019-01-06 21:05:15 +0100 |
commit | 1f0965e379035be51ae96d5761358ec088fb3421 (patch) | |
tree | 454e0c58f273dd0f4cba002bfc3cdfb88e267942 /tests | |
parent | 90121df20ddf18afdb1c25212035748ff54519c5 (diff) | |
download | gobject-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 'tests')
-rw-r--r-- | tests/scanner/Regress-1.0-expected.gir | 22 | ||||
-rw-r--r-- | tests/scanner/Utility-1.0-expected.gir | 2 |
2 files changed, 10 insertions, 14 deletions
diff --git a/tests/scanner/Regress-1.0-expected.gir b/tests/scanner/Regress-1.0-expected.gir index 5f303a4e..0ee763f1 100644 --- a/tests/scanner/Regress-1.0-expected.gir +++ b/tests/scanner/Regress-1.0-expected.gir @@ -99,15 +99,13 @@ and/or use gtk-doc annotations. --> <union> <source-position filename="regress.h" line="1480"/> <field name="a" writable="1"> - <array zero-terminated="0" - c:type="RegressLikeGnomeKeyringPasswordSchema" - fixed-size="2"> + <array zero-terminated="0" fixed-size="2"> <type name="LikeGnomeKeyringPasswordSchema" c:type="RegressLikeGnomeKeyringPasswordSchema*"/> </array> </field> <field name="padding" writable="1"> - <array zero-terminated="0" c:type="guint" fixed-size="4"> + <array zero-terminated="0" fixed-size="4"> <type name="guint" c:type="guint"/> </array> </field> @@ -1209,9 +1207,7 @@ it says it's pointer but it's actually a string.</doc> line="236">This is a test of an array of object in an field of a struct.</doc> <source-position filename="annotation.h" line="244"/> <field name="objects" writable="1"> - <array zero-terminated="0" - c:type="RegressAnnotationObject" - fixed-size="10"> + <array zero-terminated="0" fixed-size="10"> <type name="AnnotationObject" c:type="RegressAnnotationObject*"/> </array> </field> @@ -1235,7 +1231,7 @@ it says it's pointer but it's actually a string.</doc> </field> </record> <field name="padding" writable="1"> - <array zero-terminated="0" c:type="guint" fixed-size="4"> + <array zero-terminated="0" fixed-size="4"> <type name="guint" c:type="guint"/> </array> </field> @@ -2084,7 +2080,7 @@ uses a C sugar return type.</doc> </callback> </field> <field name="_reserved"> - <array zero-terminated="0" c:type="GCallback" fixed-size="4"> + <array zero-terminated="0" fixed-size="4"> <type name="GObject.Callback" c:type="GCallback"/> </array> </field> @@ -2421,7 +2417,7 @@ exposed to language bindings.</doc> <type name="gint" c:type="int"/> </field> <field name="lines" writable="1"> - <array zero-terminated="0" c:type="char" fixed-size="80"> + <array zero-terminated="0" fixed-size="80"> <type name="gchar" c:type="char"/> </array> </field> @@ -2510,7 +2506,7 @@ exposed to language bindings.</doc> <type name="gint" c:type="int"/> </field> <field name="attributes" writable="1"> - <array zero-terminated="0" c:type="gpointer" fixed-size="32"> + <array zero-terminated="0" fixed-size="32"> <type name="gpointer" c:type="gpointer"/> </array> </field> @@ -2521,7 +2517,7 @@ exposed to language bindings.</doc> <record name="LikeXklConfigItem" c:type="RegressLikeXklConfigItem"> <source-position filename="regress.h" line="1415"/> <field name="name" writable="1"> - <array zero-terminated="0" c:type="gchar" fixed-size="32"> + <array zero-terminated="0" fixed-size="32"> <type name="gchar" c:type="gchar"/> </array> </field> @@ -5090,7 +5086,7 @@ the introspection client langage.</doc> <type name="gint" c:type="gint"/> </field> <field name="array" writable="1"> - <array zero-terminated="0" c:type="gint" fixed-size="10"> + <array zero-terminated="0" fixed-size="10"> <type name="gint" c:type="gint"/> </array> </field> diff --git a/tests/scanner/Utility-1.0-expected.gir b/tests/scanner/Utility-1.0-expected.gir index 2521efbb..010bd45b 100644 --- a/tests/scanner/Utility-1.0-expected.gir +++ b/tests/scanner/Utility-1.0-expected.gir @@ -141,7 +141,7 @@ and/or use gtk-doc annotations. --> <type name="guint" c:type="guint"/> </field> <field name="data" writable="1"> - <array zero-terminated="0" c:type="guint8" fixed-size="16"> + <array zero-terminated="0" fixed-size="16"> <type name="guint8" c:type="guint8"/> </array> </field> |