diff options
author | Colin Walters <walters@verbum.org> | 2010-07-21 21:06:17 -0400 |
---|---|---|
committer | Colin Walters <walters@verbum.org> | 2010-08-31 16:05:56 -0400 |
commit | e66d50732c8ce5cf3ef198e114d94e102a1c4911 (patch) | |
tree | 11136782cda96b23479e388197bcf58736842e2d /tests/scanner | |
parent | abc4e514ff46ed77159b19f56dea54eeef8bc909 (diff) | |
download | gobject-introspection-e66d50732c8ce5cf3ef198e114d94e102a1c4911.tar.gz |
Use GLib types consistently
Rather than have the scanner/parser handle both e.g. "glong" and
"long", simply use the GLib types everywhere.
This commit adds TYPE_LONG_LONG and TYPE_LONG_DOUBLE to the
scanner types; however, rather than add them to the typelib,
they're just marked as not-introspectable.
Diffstat (limited to 'tests/scanner')
-rw-r--r-- | tests/scanner/Annotation-1.0-expected.gir | 426 | ||||
-rw-r--r-- | tests/scanner/Bar-1.0-expected.gir | 4 | ||||
-rw-r--r-- | tests/scanner/Foo-1.0-expected.gir | 228 | ||||
-rw-r--r-- | tests/scanner/Regress-1.0-expected.gir | 446 | ||||
-rw-r--r-- | tests/scanner/TestInherit-1.0-expected.gir | 34 | ||||
-rw-r--r-- | tests/scanner/Utility-1.0-expected.gir | 38 | ||||
-rw-r--r-- | tests/scanner/annotation.c | 2 |
7 files changed, 589 insertions, 589 deletions
diff --git a/tests/scanner/Annotation-1.0-expected.gir b/tests/scanner/Annotation-1.0-expected.gir index 9401ca2c..39c9b1df 100644 --- a/tests/scanner/Annotation-1.0-expected.gir +++ b/tests/scanner/Annotation-1.0-expected.gir @@ -18,12 +18,12 @@ and/or use gtk-doc annotations. --> <doc xml:whitespace="preserve">This is a callback.</doc> <return-value transfer-ownership="none"> <doc xml:whitespace="preserve">array of ints</doc> - <type name="int" c:type="gint*"/> + <type name="gint" c:type="gint*"/> </return-value> <parameters> <parameter name="in" transfer-ownership="none"> <doc xml:whitespace="preserve">array of ints</doc> - <type name="int" c:type="gint*"/> + <type name="gint" c:type="gint*"/> </parameter> </parameters> </callback> @@ -39,7 +39,7 @@ and/or use gtk-doc annotations. --> <type name="utf8" c:type="char*"/> </parameter> <parameter name="user_data" transfer-ownership="none" closure="2"> - <type name="any" c:type="gpointer"/> + <type name="gpointer" c:type="gpointer"/> </parameter> </parameters> </callback> @@ -69,7 +69,7 @@ and/or use gtk-doc annotations. --> <parameters> <parameter name="data" transfer-ownership="none" closure="0"> <doc xml:whitespace="preserve">The user data</doc> - <type name="any" c:type="gpointer"/> + <type name="gpointer" c:type="gpointer"/> </parameter> </parameters> </callback> @@ -81,36 +81,6 @@ and/or use gtk-doc annotations. --> glib:type-struct="ObjectClass"> <attribute name="org.example.Test" value="cows"/> <doc xml:whitespace="preserve">This is an object used to test annotations.</doc> - <method name="method" c:identifier="annotation_object_method"> - <return-value transfer-ownership="none"> - <doc xml:whitespace="preserve">an int</doc> - <type name="int" c:type="gint"/> - </return-value> - </method> - <method name="out" c:identifier="annotation_object_out"> - <doc xml:whitespace="preserve">This is a test for out arguments</doc> - <return-value transfer-ownership="none"> - <doc xml:whitespace="preserve">an int</doc> - <type name="int" c:type="gint"/> - </return-value> - <parameters> - <parameter name="outarg" - direction="out" - caller-allocates="0" - transfer-ownership="full"> - <doc xml:whitespace="preserve">This is an argument test</doc> - <type name="int" c:type="int*"/> - </parameter> - </parameters> - </method> - <method name="create_object" - c:identifier="annotation_object_create_object"> - <doc xml:whitespace="preserve">Test returning a caller-owned object</doc> - <return-value transfer-ownership="full"> - <doc xml:whitespace="preserve">The object</doc> - <type name="GObject.Object" c:type="GObject*"/> - </return-value> - </method> <method name="allow_none" c:identifier="annotation_object_allow_none"> <return-value transfer-ownership="full"> <type name="GObject.Object" c:type="GObject*"/> @@ -121,79 +91,11 @@ and/or use gtk-doc annotations. --> </parameter> </parameters> </method> - <method name="notrans" c:identifier="annotation_object_notrans"> - <return-value transfer-ownership="none"> - <doc xml:whitespace="preserve">An object, not referenced</doc> - <type name="GObject.Object" c:type="GObject*"/> - </return-value> - </method> - <method name="inout" c:identifier="annotation_object_inout"> - <doc xml:whitespace="preserve">This is a test for out arguments</doc> - <return-value transfer-ownership="none"> - <doc xml:whitespace="preserve">an int</doc> - <type name="int" c:type="gint"/> - </return-value> - <parameters> - <parameter name="inoutarg" - direction="inout" - caller-allocates="0" - transfer-ownership="full"> - <doc xml:whitespace="preserve">This is an argument test</doc> - <type name="int" c:type="int*"/> - </parameter> - </parameters> - </method> - <method name="inout2" c:identifier="annotation_object_inout2"> - <doc xml:whitespace="preserve">This is a second test for out arguments</doc> - <return-value transfer-ownership="none"> - <doc xml:whitespace="preserve">an int</doc> - <type name="int" c:type="gint"/> - </return-value> - <parameters> - <parameter name="inoutarg" - direction="inout" - caller-allocates="0" - transfer-ownership="full"> - <doc xml:whitespace="preserve">This is an argument test</doc> - <type name="int" c:type="int*"/> - </parameter> - </parameters> - </method> - <method name="inout3" c:identifier="annotation_object_inout3"> - <doc xml:whitespace="preserve">This is a 3th test for out arguments</doc> - <return-value transfer-ownership="none"> - <doc xml:whitespace="preserve">an int</doc> - <type name="int" c:type="gint"/> - </return-value> - <parameters> - <parameter name="inoutarg" - direction="inout" - caller-allocates="0" - transfer-ownership="full" - allow-none="1"> - <doc xml:whitespace="preserve">This is an argument test</doc> - <type name="int" c:type="int*"/> - </parameter> - </parameters> - </method> - <method name="in" c:identifier="annotation_object_in"> - <doc xml:whitespace="preserve">This is a test for in arguments</doc> - <return-value transfer-ownership="none"> - <doc xml:whitespace="preserve">an int</doc> - <type name="int" c:type="gint"/> - </return-value> - <parameters> - <parameter name="inarg" transfer-ownership="none"> - <doc xml:whitespace="preserve">This is an argument test</doc> - <type name="int" c:type="int*"/> - </parameter> - </parameters> - </method> <method name="calleeowns" c:identifier="annotation_object_calleeowns"> <doc xml:whitespace="preserve">This is a test for out arguments; GObject defaults to transfer</doc> <return-value transfer-ownership="none"> <doc xml:whitespace="preserve">an int</doc> - <type name="int" c:type="gint"/> + <type name="gint" c:type="gint"/> </return-value> <parameters> <parameter name="toown" @@ -209,7 +111,7 @@ and/or use gtk-doc annotations. --> <doc xml:whitespace="preserve">This is a test for out arguments, one transferred, other not</doc> <return-value transfer-ownership="none"> <doc xml:whitespace="preserve">an int</doc> - <type name="int" c:type="gint"/> + <type name="gint" c:type="gint"/> </return-value> <parameters> <parameter name="toown1" @@ -228,60 +130,6 @@ and/or use gtk-doc annotations. --> </parameter> </parameters> </method> - <method name="get_strings" c:identifier="annotation_object_get_strings"> - <doc xml:whitespace="preserve">This is a test for returning a list of strings, where -each string needs to be freed.</doc> - <return-value transfer-ownership="full"> - <doc xml:whitespace="preserve">list of strings</doc> - <type name="GLib.List" c:type="GList*"> - <type name="utf8"/> - </type> - </return-value> - </method> - <method name="get_hash" c:identifier="annotation_object_get_hash"> - <doc xml:whitespace="preserve">This is a test for returning a hash table mapping strings to -objects.</doc> - <return-value transfer-ownership="full"> - <doc xml:whitespace="preserve">hash table</doc> - <type name="GLib.HashTable" c:type="GHashTable*"> - <type name="utf8"/> - <type name="GObject.Object"/> - </type> - </return-value> - </method> - <method name="with_voidp" c:identifier="annotation_object_with_voidp"> - <return-value transfer-ownership="none"> - <type name="none" c:type="void"/> - </return-value> - <parameters> - <parameter name="data" transfer-ownership="none"> - <type name="any" c:type="void*"/> - </parameter> - </parameters> - </method> - <method name="get_objects" c:identifier="annotation_object_get_objects"> - <doc xml:whitespace="preserve">This is a test for returning a list of objects. -The list itself should be freed, but not the internal objects, -intentionally similar example to gtk_container_get_children</doc> - <return-value transfer-ownership="container"> - <doc xml:whitespace="preserve">list of objects</doc> - <type name="GLib.SList" c:type="GSList*"> - <type name="Object"/> - </type> - </return-value> - </method> - <method name="use_buffer" c:identifier="annotation_object_use_buffer"> - <return-value transfer-ownership="none"> - <type name="none" c:type="void"/> - </return-value> - <parameters> - <parameter name="bytes" transfer-ownership="none"> - <array c:type="guchar*"> - <type name="uint8"/> - </array> - </parameter> - </parameters> - </method> <method name="compute_sum" c:identifier="annotation_object_compute_sum"> <doc xml:whitespace="preserve">Test taking a zero-terminated array</doc> <return-value transfer-ownership="none"> @@ -291,7 +139,7 @@ intentionally similar example to gtk_container_get_children</doc> <parameter name="nums" transfer-ownership="none"> <doc xml:whitespace="preserve">Sequence of numbers</doc> <array c:type="int*"> - <type name="int"/> + <type name="gint"/> </array> </parameter> </parameters> @@ -306,12 +154,12 @@ intentionally similar example to gtk_container_get_children</doc> <parameter name="nums" transfer-ownership="none"> <doc xml:whitespace="preserve">Sequence of numbers that are zero-terminated</doc> <array zero-terminated="0" length="2" c:type="int*"> - <type name="int"/> + <type name="gint"/> </array> </parameter> <parameter name="n_nums" transfer-ownership="none"> <doc xml:whitespace="preserve">Length of number array</doc> - <type name="int" c:type="int"/> + <type name="gint" c:type="int"/> </parameter> </parameters> </method> @@ -325,71 +173,199 @@ intentionally similar example to gtk_container_get_children</doc> <parameter name="nums" transfer-ownership="none"> <doc xml:whitespace="preserve">Sequence of numbers that are zero-terminated</doc> <array length="2" c:type="int*"> - <type name="int"/> + <type name="gint"/> </array> </parameter> <parameter name="n_nums" transfer-ownership="none"> <doc xml:whitespace="preserve">Length of number array</doc> - <type name="int" c:type="int"/> + <type name="gint" c:type="int"/> </parameter> </parameters> </method> - <method name="parse_args" c:identifier="annotation_object_parse_args"> - <doc xml:whitespace="preserve">Test taking a zero-terminated array with length parameter</doc> + <method name="create_object" + c:identifier="annotation_object_create_object"> + <doc xml:whitespace="preserve">Test returning a caller-owned object</doc> + <return-value transfer-ownership="full"> + <doc xml:whitespace="preserve">The object</doc> + <type name="GObject.Object" c:type="GObject*"/> + </return-value> + </method> + <method name="do_not_use" + c:identifier="annotation_object_do_not_use" + deprecated="Use annotation_object_create_object() instead." + deprecated-version="0.12"> + <return-value transfer-ownership="full"> + <type name="GObject.Object" c:type="GObject*"/> + </return-value> + </method> + <method name="extra_annos" c:identifier="annotation_object_extra_annos"> + <attribute name="org.foobar" value="testvalue"/> + <return-value transfer-ownership="none"> + <type name="none" c:type="void"/> + </return-value> + </method> + <method name="foreach" c:identifier="annotation_object_foreach"> + <doc xml:whitespace="preserve">Test taking a call-scoped callback</doc> <return-value transfer-ownership="none"> <type name="none" c:type="void"/> </return-value> <parameters> - <parameter name="argc" + <parameter name="func" + transfer-ownership="none" + scope="call" + closure="2"> + <doc xml:whitespace="preserve">Callback to invoke</doc> + <type name="ForeachFunc" c:type="AnnotationForeachFunc"/> + </parameter> + <parameter name="user_data" transfer-ownership="none"> + <doc xml:whitespace="preserve">Callback user data</doc> + <type name="gpointer" c:type="gpointer"/> + </parameter> + </parameters> + </method> + <method name="get_hash" c:identifier="annotation_object_get_hash"> + <doc xml:whitespace="preserve">This is a test for returning a hash table mapping strings to +objects.</doc> + <return-value transfer-ownership="full"> + <doc xml:whitespace="preserve">hash table</doc> + <type name="GLib.HashTable" c:type="GHashTable*"> + <type name="utf8"/> + <type name="GObject.Object"/> + </type> + </return-value> + </method> + <method name="get_objects" c:identifier="annotation_object_get_objects"> + <doc xml:whitespace="preserve">This is a test for returning a list of objects. +The list itself should be freed, but not the internal objects, +intentionally similar example to gtk_container_get_children</doc> + <return-value transfer-ownership="container"> + <doc xml:whitespace="preserve">list of objects</doc> + <type name="GLib.SList" c:type="GSList*"> + <type name="Object"/> + </type> + </return-value> + </method> + <method name="get_strings" c:identifier="annotation_object_get_strings"> + <doc xml:whitespace="preserve">This is a test for returning a list of strings, where +each string needs to be freed.</doc> + <return-value transfer-ownership="full"> + <doc xml:whitespace="preserve">list of strings</doc> + <type name="GLib.List" c:type="GList*"> + <type name="utf8"/> + </type> + </return-value> + </method> + <method name="in" c:identifier="annotation_object_in"> + <doc xml:whitespace="preserve">This is a test for in arguments</doc> + <return-value transfer-ownership="none"> + <doc xml:whitespace="preserve">an int</doc> + <type name="gint" c:type="gint"/> + </return-value> + <parameters> + <parameter name="inarg" transfer-ownership="none"> + <doc xml:whitespace="preserve">This is an argument test</doc> + <type name="gint" c:type="int*"/> + </parameter> + </parameters> + </method> + <method name="inout" c:identifier="annotation_object_inout"> + <doc xml:whitespace="preserve">This is a test for out arguments</doc> + <return-value transfer-ownership="none"> + <doc xml:whitespace="preserve">an int</doc> + <type name="gint" c:type="gint"/> + </return-value> + <parameters> + <parameter name="inoutarg" direction="inout" caller-allocates="0" transfer-ownership="full"> - <doc xml:whitespace="preserve">Length of the argument vector</doc> - <type name="int" c:type="int*"/> + <doc xml:whitespace="preserve">This is an argument test</doc> + <type name="gint" c:type="int*"/> </parameter> - <parameter name="argv" + </parameters> + </method> + <method name="inout2" c:identifier="annotation_object_inout2"> + <doc xml:whitespace="preserve">This is a second test for out arguments</doc> + <return-value transfer-ownership="none"> + <doc xml:whitespace="preserve">an int</doc> + <type name="gint" c:type="gint"/> + </return-value> + <parameters> + <parameter name="inoutarg" direction="inout" caller-allocates="0" transfer-ownership="full"> - <doc xml:whitespace="preserve">Argument vector</doc> - <array length="1" c:type="char***"> - <type name="utf8"/> - </array> + <doc xml:whitespace="preserve">This is an argument test</doc> + <type name="gint" c:type="int*"/> </parameter> </parameters> </method> - <method name="string_out" c:identifier="annotation_object_string_out"> - <doc xml:whitespace="preserve">Test returning a string as an out parameter</doc> + <method name="inout3" c:identifier="annotation_object_inout3"> + <doc xml:whitespace="preserve">This is a 3th test for out arguments</doc> <return-value transfer-ownership="none"> - <doc xml:whitespace="preserve">some boolean</doc> - <type name="boolean" c:type="gboolean"/> + <doc xml:whitespace="preserve">an int</doc> + <type name="gint" c:type="gint"/> </return-value> <parameters> - <parameter name="str_out" + <parameter name="inoutarg" + direction="inout" + caller-allocates="0" + transfer-ownership="full" + allow-none="1"> + <doc xml:whitespace="preserve">This is an argument test</doc> + <type name="gint" c:type="int*"/> + </parameter> + </parameters> + </method> + <method name="method" c:identifier="annotation_object_method"> + <return-value transfer-ownership="none"> + <doc xml:whitespace="preserve">an int</doc> + <type name="gint" c:type="gint"/> + </return-value> + </method> + <method name="notrans" c:identifier="annotation_object_notrans"> + <return-value transfer-ownership="none"> + <doc xml:whitespace="preserve">An object, not referenced</doc> + <type name="GObject.Object" c:type="GObject*"/> + </return-value> + </method> + <method name="out" c:identifier="annotation_object_out"> + <doc xml:whitespace="preserve">This is a test for out arguments</doc> + <return-value transfer-ownership="none"> + <doc xml:whitespace="preserve">an int</doc> + <type name="gint" c:type="gint"/> + </return-value> + <parameters> + <parameter name="outarg" direction="out" caller-allocates="0" transfer-ownership="full"> - <doc xml:whitespace="preserve">string return value</doc> - <type name="utf8" c:type="char**"/> + <doc xml:whitespace="preserve">This is an argument test</doc> + <type name="gint" c:type="int*"/> </parameter> </parameters> </method> - <method name="foreach" c:identifier="annotation_object_foreach"> - <doc xml:whitespace="preserve">Test taking a call-scoped callback</doc> + <method name="parse_args" c:identifier="annotation_object_parse_args"> + <doc xml:whitespace="preserve">Test taking a zero-terminated array with length parameter</doc> <return-value transfer-ownership="none"> <type name="none" c:type="void"/> </return-value> <parameters> - <parameter name="func" - transfer-ownership="none" - scope="call" - closure="2"> - <doc xml:whitespace="preserve">Callback to invoke</doc> - <type name="ForeachFunc" c:type="AnnotationForeachFunc"/> + <parameter name="argc" + direction="inout" + caller-allocates="0" + transfer-ownership="full"> + <doc xml:whitespace="preserve">Length of the argument vector</doc> + <type name="gint" c:type="int*"/> </parameter> - <parameter name="user_data" transfer-ownership="none"> - <doc xml:whitespace="preserve">Callback user data</doc> - <type name="any" c:type="gpointer"/> + <parameter name="argv" + direction="inout" + caller-allocates="0" + transfer-ownership="full"> + <doc xml:whitespace="preserve">Argument vector</doc> + <array length="1" c:type="char***"> + <type name="utf8"/> + </array> </parameter> </parameters> </method> @@ -402,12 +378,12 @@ intentionally similar example to gtk_container_get_children</doc> <parameter name="data" transfer-ownership="none"> <doc xml:whitespace="preserve">The data</doc> <array length="2" c:type="guchar*"> - <type name="uint8"/> + <type name="guint8"/> </array> </parameter> <parameter name="length" transfer-ownership="none"> <doc xml:whitespace="preserve">Length of the data</doc> - <type name="gsize" c:type="gsize"/> + <type name="gulong" c:type="gsize"/> </parameter> </parameters> </method> @@ -420,12 +396,12 @@ intentionally similar example to gtk_container_get_children</doc> <parameter name="data" transfer-ownership="none"> <doc xml:whitespace="preserve">The data</doc> <array length="2" c:type="gchar*"> - <type name="int8"/> + <type name="gint8"/> </array> </parameter> <parameter name="length" transfer-ownership="none"> <doc xml:whitespace="preserve">Length of the data</doc> - <type name="gsize" c:type="gsize"/> + <type name="gulong" c:type="gsize"/> </parameter> </parameters> </method> @@ -439,22 +415,42 @@ type.</doc> <parameter name="data" transfer-ownership="none"> <doc xml:whitespace="preserve">The data</doc> <array length="2" c:type="gpointer"> - <type name="uint8"/> + <type name="guint8"/> </array> </parameter> <parameter name="length" transfer-ownership="none"> <doc xml:whitespace="preserve">Length of the data</doc> - <type name="gsize" c:type="gsize"/> + <type name="gulong" c:type="gsize"/> </parameter> </parameters> </method> - <method name="do_not_use" - c:identifier="annotation_object_do_not_use" - deprecated="Use annotation_object_create_object() instead." - deprecated-version="0.12"> - <return-value transfer-ownership="full"> - <type name="GObject.Object" c:type="GObject*"/> + <method name="string_out" c:identifier="annotation_object_string_out"> + <doc xml:whitespace="preserve">Test returning a string as an out parameter</doc> + <return-value transfer-ownership="none"> + <doc xml:whitespace="preserve">some boolean</doc> + <type name="gboolean" c:type="gboolean"/> </return-value> + <parameters> + <parameter name="str_out" + direction="out" + caller-allocates="0" + transfer-ownership="full"> + <doc xml:whitespace="preserve">string return value</doc> + <type name="utf8" c:type="char**"/> + </parameter> + </parameters> + </method> + <method name="use_buffer" c:identifier="annotation_object_use_buffer"> + <return-value transfer-ownership="none"> + <type name="none" c:type="void"/> + </return-value> + <parameters> + <parameter name="bytes" transfer-ownership="none"> + <array c:type="guchar*"> + <type name="guint8"/> + </array> + </parameter> + </parameters> </method> <method name="watch" c:identifier="annotation_object_watch_full"> <doc xml:whitespace="preserve">Test overriding via the "Rename To" annotation.</doc> @@ -472,7 +468,7 @@ type.</doc> </parameter> <parameter name="user_data" transfer-ownership="none"> <doc xml:whitespace="preserve">The callback data</doc> - <type name="any" c:type="gpointer"/> + <type name="gpointer" c:type="gpointer"/> </parameter> <parameter name="destroy" transfer-ownership="none" scope="call"> <doc xml:whitespace="preserve">Destroy notification</doc> @@ -480,11 +476,15 @@ type.</doc> </parameter> </parameters> </method> - <method name="extra_annos" c:identifier="annotation_object_extra_annos"> - <attribute name="org.foobar" value="testvalue"/> + <method name="with_voidp" c:identifier="annotation_object_with_voidp"> <return-value transfer-ownership="none"> <type name="none" c:type="void"/> </return-value> + <parameters> + <parameter name="data" transfer-ownership="none"> + <type name="gpointer" c:type="void*"/> + </parameter> + </parameters> </method> <property name="function-property" writable="1" @@ -532,7 +532,7 @@ type.</doc> </return-value> <parameters> <parameter name="object" transfer-ownership="none"> - <type name="any" c:type="gpointer"/> + <type name="gpointer" c:type="gpointer"/> </parameter> </parameters> </glib:signal> @@ -588,7 +588,7 @@ it says it's pointer but it's actually a string.</doc> <attribute name="yet.another.annotation" value="another_value"/> <attribute name="some.other.annotation" value="value2"/> <doc xml:whitespace="preserve">The return value.</doc> - <type name="int" c:type="gint"/> + <type name="gint" c:type="gint"/> </return-value> <parameters> <parameter name="object" transfer-ownership="none"> @@ -622,7 +622,7 @@ detection, and fixing it via annotations.</doc> <type name="NotifyFunc" c:type="AnnotationNotifyFunc"/> </parameter> <parameter name="data" transfer-ownership="none"> - <type name="any" c:type="gpointer"/> + <type name="gpointer" c:type="gpointer"/> </parameter> </parameters> </function> @@ -642,7 +642,7 @@ detection, and fixing it via annotations.</doc> caller-allocates="0" transfer-ownership="full"> <doc xml:whitespace="preserve">The number of args.</doc> - <type name="int" c:type="int*"/> + <type name="gint" c:type="int*"/> </parameter> <parameter name="argv" direction="inout" @@ -663,7 +663,7 @@ detection, and fixing it via annotations.</doc> <parameters> <parameter name="foo" transfer-ownership="none"> <doc xml:whitespace="preserve">some text (e.g. example) or else</doc> - <type name="int" c:type="int"/> + <type name="gint" c:type="int"/> </parameter> </parameters> </function> @@ -693,7 +693,7 @@ detection, and fixing it via annotations.</doc> caller-allocates="0" transfer-ownership="full"> <doc xml:whitespace="preserve">Number of return values</doc> - <type name="int" c:type="int*"/> + <type name="gint" c:type="int*"/> </parameter> </parameters> </function> @@ -715,7 +715,7 @@ detection, and fixing it via annotations.</doc> </return-value> <parameters> <parameter name="n_properties" transfer-ownership="none"> - <type name="uint" c:type="guint"/> + <type name="guint" c:type="guint"/> </parameter> <parameter name="properties" transfer-ownership="none"> <array length="0" c:type="gchar*"> diff --git a/tests/scanner/Bar-1.0-expected.gir b/tests/scanner/Bar-1.0-expected.gir index 0f665a63..dee28b37 100644 --- a/tests/scanner/Bar-1.0-expected.gir +++ b/tests/scanner/Bar-1.0-expected.gir @@ -38,10 +38,10 @@ and/or use gtk-doc annotations. --> </return-value> <parameters> <parameter name="x" transfer-ownership="none"> - <type name="int" c:type="int"/> + <type name="gint" c:type="int"/> </parameter> <parameter name="y" transfer-ownership="none"> - <type name="double" c:type="double"/> + <type name="gdouble" c:type="double"/> </parameter> </parameters> </function> diff --git a/tests/scanner/Foo-1.0-expected.gir b/tests/scanner/Foo-1.0-expected.gir index e14d3c80..c2dd7309 100644 --- a/tests/scanner/Foo-1.0-expected.gir +++ b/tests/scanner/Foo-1.0-expected.gir @@ -17,7 +17,7 @@ and/or use gtk-doc annotations. --> shared-library="libfoo.so" c:prefix="Foo"> <alias name="ObjectCookie" c:type="FooObjectCookie"> - <type name="any"/> + <type name="gpointer"/> </alias> <alias name="XEvent" c:type="FooXEvent"> <type name="none"/> @@ -37,10 +37,10 @@ and/or use gtk-doc annotations. --> glib:type-name="FooBRect" glib:get-type="foo_brect_get_type"> <field name="x" writable="1"> - <type name="double" c:type="double"/> + <type name="gdouble" c:type="double"/> </field> <field name="y" writable="1"> - <type name="double" c:type="double"/> + <type name="gdouble" c:type="double"/> </field> <constructor name="new" c:identifier="foo_brect_new"> <return-value transfer-ownership="full"> @@ -48,10 +48,10 @@ and/or use gtk-doc annotations. --> </return-value> <parameters> <parameter name="x" transfer-ownership="none"> - <type name="double" c:type="double"/> + <type name="gdouble" c:type="double"/> </parameter> <parameter name="y" transfer-ownership="none"> - <type name="double" c:type="double"/> + <type name="gdouble" c:type="double"/> </parameter> </parameters> </constructor> @@ -71,10 +71,10 @@ and/or use gtk-doc annotations. --> glib:type-name="FooBUnion" glib:get-type="foo_bunion_get_type"> <field name="type" writable="1"> - <type name="int" c:type="int"/> + <type name="gint" c:type="int"/> </field> <field name="v" writable="1"> - <type name="double" c:type="double"/> + <type name="gdouble" c:type="double"/> </field> <field name="rect" writable="1"> <type name="BRect" c:type="FooBRect*"/> @@ -87,7 +87,7 @@ and/or use gtk-doc annotations. --> <method name="get_contained_type" c:identifier="foo_bunion_get_contained_type"> <return-value transfer-ownership="none"> - <type name="int" c:type="int"/> + <type name="gint" c:type="int"/> </return-value> </method> </union> @@ -125,17 +125,17 @@ and/or use gtk-doc annotations. --> </record> <callback name="Callback" c:type="FooCallback"> <return-value transfer-ownership="none"> - <type name="boolean" c:type="gboolean"/> + <type name="gboolean" c:type="gboolean"/> </return-value> <parameters> <parameter name="foo" transfer-ownership="none"> <type name="Object" c:type="FooObject*"/> </parameter> <parameter name="b" transfer-ownership="none"> - <type name="boolean" c:type="gboolean"/> + <type name="gboolean" c:type="gboolean"/> </parameter> <parameter name="data" transfer-ownership="none"> - <type name="any" c:type="gpointer"/> + <type name="gpointer" c:type="gpointer"/> </parameter> </parameters> </callback> @@ -200,7 +200,7 @@ and/or use gtk-doc annotations. --> </enumeration> <union name="Event" c:type="FooEvent"> <field name="type" writable="1"> - <type name="int" c:type="int"/> + <type name="gint" c:type="int"/> </field> <field name="any" writable="1"> <type name="EventAny" c:type="FooEventAny"/> @@ -211,15 +211,15 @@ and/or use gtk-doc annotations. --> </union> <record name="EventAny" c:type="FooEventAny"> <field name="send_event" writable="1"> - <type name="int8" c:type="gint8"/> + <type name="gint8" c:type="gint8"/> </field> </record> <record name="EventExpose" c:type="FooEventExpose"> <field name="send_event" writable="1"> - <type name="int8" c:type="gint8"/> + <type name="gint8" c:type="gint8"/> </field> <field name="count" writable="1"> - <type name="int" c:type="gint"/> + <type name="gint" c:type="gint"/> </field> </record> <bitfield name="FlagsNoType" c:type="FooFlagsNoType"> @@ -246,7 +246,7 @@ and/or use gtk-doc annotations. --> </bitfield> <record name="ForeignStruct" c:type="FooForeignStruct" foreign="1"> <field name="foo" writable="1"> - <type name="int" c:type="int"/> + <type name="gint" c:type="int"/> </field> </record> <interface name="Interface" @@ -260,7 +260,7 @@ and/or use gtk-doc annotations. --> </return-value> <parameters> <parameter name="x" transfer-ownership="none"> - <type name="int" c:type="int"/> + <type name="gint" c:type="int"/> </parameter> </parameters> </virtual-method> @@ -270,7 +270,7 @@ and/or use gtk-doc annotations. --> </return-value> <parameters> <parameter name="x" transfer-ownership="none"> - <type name="int" c:type="int"/> + <type name="gint" c:type="int"/> </parameter> </parameters> </method> @@ -291,7 +291,7 @@ and/or use gtk-doc annotations. --> <type name="Interface" c:type="FooInterface*"/> </parameter> <parameter name="x" transfer-ownership="none"> - <type name="int" c:type="int"/> + <type name="gint" c:type="int"/> </parameter> </parameters> </callback> @@ -309,11 +309,6 @@ and/or use gtk-doc annotations. --> <type name="Object" c:type="FooObject*"/> </return-value> </constructor> - <function name="static_meth" c:identifier="foo_object_static_meth"> - <return-value transfer-ownership="none"> - <type name="int" c:type="int"/> - </return-value> - </function> <function name="get_default" c:identifier="foo_object_get_default"> <doc xml:whitespace="preserve">This function is intended to match clutter_stage_get_default which uses a C sugar return type.</doc> @@ -322,16 +317,11 @@ uses a C sugar return type.</doc> <type name="Subobject" c:type="FooObject*"/> </return-value> </function> - <virtual-method name="virtual_method" invoker="virtual_method"> + <function name="static_meth" c:identifier="foo_object_static_meth"> <return-value transfer-ownership="none"> - <type name="boolean" c:type="gboolean"/> + <type name="gint" c:type="int"/> </return-value> - <parameters> - <parameter name="first_param" transfer-ownership="none"> - <type name="int" c:type="int"/> - </parameter> - </parameters> - </virtual-method> + </function> <virtual-method name="read_fn" invoker="read"> <doc xml:whitespace="preserve">Read some stuff.</doc> <return-value transfer-ownership="none"> @@ -340,45 +330,56 @@ uses a C sugar return type.</doc> <parameters> <parameter name="offset" transfer-ownership="none"> <doc xml:whitespace="preserve">offset</doc> - <type name="int" c:type="int"/> + <type name="gint" c:type="int"/> </parameter> <parameter name="length" transfer-ownership="none"> <doc xml:whitespace="preserve">length</doc> - <type name="int" c:type="int"/> + <type name="gint" c:type="int"/> </parameter> </parameters> </virtual-method> + <virtual-method name="virtual_method" invoker="virtual_method"> + <return-value transfer-ownership="none"> + <type name="gboolean" c:type="gboolean"/> + </return-value> + <parameters> + <parameter name="first_param" transfer-ownership="none"> + <type name="gint" c:type="int"/> + </parameter> + </parameters> + </virtual-method> + <method name="dup_name" c:identifier="foo_object_dup_name"> + <return-value transfer-ownership="full"> + <type name="utf8" c:type="char*"/> + </return-value> + </method> <method name="external_type" c:identifier="foo_object_external_type"> <return-value transfer-ownership="full"> <type name="Utility.Object" c:type="UtilityObject*"/> </return-value> </method> - <method name="various" c:identifier="foo_object_various"> + <method name="get_name" c:identifier="foo_object_get_name"> + <return-value transfer-ownership="none"> + <type name="utf8" c:type="char*"/> + </return-value> + </method> + <method name="handle_glyph" c:identifier="foo_object_handle_glyph"> <return-value transfer-ownership="none"> <type name="none" c:type="void"/> </return-value> <parameters> - <parameter name="data" transfer-ownership="none"> - <type name="any" c:type="void*"/> - </parameter> - <parameter name="some_type" transfer-ownership="none"> - <type name="GType" c:type="GType"/> + <parameter name="glyph" transfer-ownership="none"> + <type name="Utility.Glyph" c:type="UtilityGlyph"/> </parameter> </parameters> </method> - <method name="take_all" - c:identifier="foo_object_take_all" - introspectable="0"> + <method name="is_it_time_yet" c:identifier="foo_object_is_it_time_yet"> <return-value transfer-ownership="none"> <type name="none" c:type="void"/> </return-value> <parameters> - <parameter name="x" transfer-ownership="none"> - <type name="int" c:type="int"/> - </parameter> - <parameter transfer-ownership="none"> - <varargs> - </varargs> + <parameter name="time" transfer-ownership="none"> + <type name="glong" c:type="time_t"/> </parameter> </parameters> </method> @@ -392,69 +393,68 @@ uses a C sugar return type.</doc> </parameter> </parameters> </method> - <method name="is_it_time_yet" c:identifier="foo_object_is_it_time_yet"> + <method name="read" c:identifier="foo_object_read"> + <doc xml:whitespace="preserve">Read some stuff.</doc> <return-value transfer-ownership="none"> <type name="none" c:type="void"/> </return-value> <parameters> - <parameter name="time" transfer-ownership="none"> - <type name="long" c:type="time_t"/> + <parameter name="offset" transfer-ownership="none"> + <doc xml:whitespace="preserve">offset</doc> + <type name="gint" c:type="int"/> + </parameter> + <parameter name="length" transfer-ownership="none"> + <doc xml:whitespace="preserve">length</doc> + <type name="gint" c:type="int"/> </parameter> </parameters> </method> - <method name="get_name" c:identifier="foo_object_get_name"> + <method name="skipped_method" + c:identifier="foo_object_skipped_method" + introspectable="0"> + <doc xml:whitespace="preserve">This is only useful from C.</doc> <return-value transfer-ownership="none"> - <type name="utf8" c:type="char*"/> - </return-value> - </method> - <method name="dup_name" c:identifier="foo_object_dup_name"> - <return-value transfer-ownership="full"> - <type name="utf8" c:type="char*"/> + <type name="none" c:type="void"/> </return-value> </method> - <method name="handle_glyph" c:identifier="foo_object_handle_glyph"> + <method name="take_all" + c:identifier="foo_object_take_all" + introspectable="0"> <return-value transfer-ownership="none"> <type name="none" c:type="void"/> </return-value> <parameters> - <parameter name="glyph" transfer-ownership="none"> - <type name="Utility.Glyph" c:type="UtilityGlyph"/> + <parameter name="x" transfer-ownership="none"> + <type name="gint" c:type="int"/> </parameter> - </parameters> - </method> - <method name="virtual_method" c:identifier="foo_object_virtual_method"> - <return-value transfer-ownership="none"> - <type name="boolean" c:type="gboolean"/> - </return-value> - <parameters> - <parameter name="first_param" transfer-ownership="none"> - <type name="int" c:type="int"/> + <parameter transfer-ownership="none"> + <varargs> + </varargs> </parameter> </parameters> </method> - <method name="read" c:identifier="foo_object_read"> - <doc xml:whitespace="preserve">Read some stuff.</doc> + <method name="various" c:identifier="foo_object_various"> <return-value transfer-ownership="none"> <type name="none" c:type="void"/> </return-value> <parameters> - <parameter name="offset" transfer-ownership="none"> - <doc xml:whitespace="preserve">offset</doc> - <type name="int" c:type="int"/> + <parameter name="data" transfer-ownership="none"> + <type name="gpointer" c:type="void*"/> </parameter> - <parameter name="length" transfer-ownership="none"> - <doc xml:whitespace="preserve">length</doc> - <type name="int" c:type="int"/> + <parameter name="some_type" transfer-ownership="none"> + <type name="GType" c:type="GType"/> </parameter> </parameters> </method> - <method name="skipped_method" - c:identifier="foo_object_skipped_method" - introspectable="0"> - <doc xml:whitespace="preserve">This is only useful from C.</doc> + <method name="virtual_method" c:identifier="foo_object_virtual_method"> <return-value transfer-ownership="none"> - <type name="none" c:type="void"/> + <type name="gboolean" c:type="gboolean"/> </return-value> + <parameters> + <parameter name="first_param" transfer-ownership="none"> + <type name="gint" c:type="int"/> + </parameter> + </parameters> </method> <property name="string" writable="1" @@ -466,7 +466,7 @@ uses a C sugar return type.</doc> <type name="GObject.Object" c:type="GObject"/> </field> <field name="some_int"> - <type name="int" c:type="int"/> + <type name="gint" c:type="int"/> </field> <glib:signal name="signal"> <return-value transfer-ownership="full"> @@ -477,7 +477,7 @@ uses a C sugar return type.</doc> <type name="GObject.Object" c:type="GObject"/> </parameter> <parameter name="p0" transfer-ownership="none"> - <type name="any" c:type="gpointer"/> + <type name="gpointer" c:type="gpointer"/> </parameter> </parameters> </glib:signal> @@ -491,14 +491,14 @@ uses a C sugar return type.</doc> <field name="virtual_method"> <callback name="virtual_method" c:type="virtual_method"> <return-value transfer-ownership="none"> - <type name="boolean" c:type="gboolean"/> + <type name="gboolean" c:type="gboolean"/> </return-value> <parameters> <parameter name="object" transfer-ownership="none"> <type name="Object" c:type="FooObject*"/> </parameter> <parameter name="first_param" transfer-ownership="none"> - <type name="int" c:type="int"/> + <type name="gint" c:type="int"/> </parameter> </parameters> </callback> @@ -514,11 +514,11 @@ uses a C sugar return type.</doc> </parameter> <parameter name="offset" transfer-ownership="none"> <doc xml:whitespace="preserve">offset</doc> - <type name="int" c:type="int"/> + <type name="gint" c:type="int"/> </parameter> <parameter name="length" transfer-ownership="none"> <doc xml:whitespace="preserve">length</doc> - <type name="int" c:type="int"/> + <type name="gint" c:type="int"/> </parameter> </parameters> </callback> @@ -530,20 +530,20 @@ uses a C sugar return type.</doc> </field> </record> <constant name="PIE_IS_TASTY" value="3.14159"> - <type name="double"/> + <type name="gdouble"/> </constant> <record name="Rectangle" c:type="FooRectangle"> <field name="x" writable="1"> - <type name="int" c:type="gint"/> + <type name="gint" c:type="gint"/> </field> <field name="y" writable="1"> - <type name="int" c:type="gint"/> + <type name="gint" c:type="gint"/> </field> <field name="width" writable="1"> - <type name="int" c:type="gint"/> + <type name="gint" c:type="gint"/> </field> <field name="height" writable="1"> - <type name="int" c:type="gint"/> + <type name="gint" c:type="gint"/> </field> <constructor name="new" c:identifier="foo_rectangle_new"> <return-value transfer-ownership="full"> @@ -551,16 +551,16 @@ uses a C sugar return type.</doc> </return-value> <parameters> <parameter name="x" transfer-ownership="none"> - <type name="int" c:type="int"/> + <type name="gint" c:type="int"/> </parameter> <parameter name="y" transfer-ownership="none"> - <type name="int" c:type="int"/> + <type name="gint" c:type="int"/> </parameter> <parameter name="width" transfer-ownership="none"> - <type name="int" c:type="int"/> + <type name="gint" c:type="int"/> </parameter> <parameter name="height" transfer-ownership="none"> - <type name="int" c:type="int"/> + <type name="gint" c:type="int"/> </parameter> </parameters> </constructor> @@ -577,7 +577,7 @@ uses a C sugar return type.</doc> </method> </record> <constant name="SUCCESS_INT" value="4408"> - <type name="int"/> + <type name="gint"/> </constant> <enumeration name="Skippable" introspectable="0" c:type="FooSkippable"> <doc xml:whitespace="preserve">Some type that is only interesting from C and should not be @@ -605,7 +605,7 @@ exposed to language bindings.</doc> <type name="StructPrivate" c:type="FooStructPrivate*"/> </field> <field name="member" writable="1"> - <type name="int" c:type="int"/> + <type name="gint" c:type="int"/> </field> </record> <record name="StructPrivate" c:type="FooStructPrivate"> @@ -689,23 +689,23 @@ exposed to language bindings.</doc> </record> <record name="ThingWithArray" c:type="_FooThingWithArray"> <field name="x" writable="1"> - <type name="int" c:type="int"/> + <type name="gint" c:type="int"/> </field> <field name="y" writable="1"> - <type name="int" c:type="int"/> + <type name="gint" c:type="int"/> </field> <field name="lines" writable="1"> <array zero-terminated="0" c:type="char" fixed-size="80"> - <type name="int8"/> + <type name="gchar"/> </array> </field> <field name="data" writable="1"> - <type name="any" c:type="guchar*"/> + <type name="gpointer" c:type="guchar*"/> </field> </record> <union name="Union" c:type="_FooUnion"> <field name="foo" writable="1"> - <type name="int" c:type="int"/> + <type name="gint" c:type="int"/> </field> </union> <record name="UtilityStruct" c:type="FooUtilityStruct"> @@ -745,7 +745,7 @@ exposed to language bindings.</doc> <type name="Gio.AsyncReadyCallback" c:type="GAsyncReadyCallback"/> </parameter> <parameter name="user_data" transfer-ownership="none"> - <type name="any" c:type="gpointer"/> + <type name="gpointer" c:type="gpointer"/> </parameter> </parameters> </function> @@ -763,7 +763,7 @@ exposed to language bindings.</doc> <type name="Callback" c:type="FooCallback"/> </parameter> <parameter name="data" transfer-ownership="none"> - <type name="any" c:type="gpointer"/> + <type name="gpointer" c:type="gpointer"/> </parameter> <parameter name="destroy" transfer-ownership="none" scope="call"> <type name="GLib.DestroyNotify" c:type="GDestroyNotify"/> @@ -772,7 +772,7 @@ exposed to language bindings.</doc> </function> <function name="enum_type_method" c:identifier="foo_enum_type_method"> <return-value transfer-ownership="none"> - <type name="int" c:type="int"/> + <type name="gint" c:type="int"/> </return-value> <parameters> <parameter name="foo_enum" transfer-ownership="none"> @@ -786,13 +786,13 @@ exposed to language bindings.</doc> </return-value> <parameters> <parameter name="x" transfer-ownership="none"> - <type name="int" c:type="int"/> + <type name="gint" c:type="int"/> </parameter> </parameters> </function> <function name="init" c:identifier="foo_init"> <return-value transfer-ownership="none"> - <type name="int" c:type="gint"/> + <type name="gint" c:type="gint"/> </return-value> </function> <function name="method_external_references" @@ -901,7 +901,7 @@ exposed to language bindings.</doc> </return-value> <parameters> <parameter name="unsigned_param" transfer-ownership="none"> - <type name="uint" c:type="unsigned int"/> + <type name="guint" c:type="unsigned int"/> </parameter> </parameters> </function> @@ -911,7 +911,7 @@ exposed to language bindings.</doc> </return-value> <parameters> <parameter name="unsigned_param" transfer-ownership="none"> - <type name="uint" c:type="unsigned"/> + <type name="guint" c:type="unsigned"/> </parameter> </parameters> </function> @@ -923,7 +923,7 @@ exposed to language bindings.</doc> </return-value> <parameters> <parameter name="i" transfer-ownership="none"> - <type name="int" c:type="gint"/> + <type name="gint" c:type="gint"/> </parameter> <parameter name="callback" transfer-ownership="none" scope="call"> <type name="VarargsCallback" c:type="FooVarargsCallback"/> diff --git a/tests/scanner/Regress-1.0-expected.gir b/tests/scanner/Regress-1.0-expected.gir index aa51b0a3..aeae8a65 100644 --- a/tests/scanner/Regress-1.0-expected.gir +++ b/tests/scanner/Regress-1.0-expected.gir @@ -19,7 +19,7 @@ and/or use gtk-doc annotations. --> glib:type-name="RegressTestBoxed" glib:get-type="regress_test_boxed_get_type"> <field name="some_int8" writable="1"> - <type name="int8" c:type="gint8"/> + <type name="gint8" c:type="gint8"/> </field> <field name="nested_a" writable="1"> <type name="TestSimpleBoxedA" c:type="RegressTestSimpleBoxedA"/> @@ -39,7 +39,7 @@ and/or use gtk-doc annotations. --> </return-value> <parameters> <parameter name="i" transfer-ownership="none"> - <type name="int" c:type="int"/> + <type name="gint" c:type="int"/> </parameter> </parameters> </constructor> @@ -50,10 +50,10 @@ and/or use gtk-doc annotations. --> </return-value> <parameters> <parameter name="i" transfer-ownership="none"> - <type name="int" c:type="int"/> + <type name="gint" c:type="int"/> </parameter> <parameter name="j" transfer-ownership="none"> - <type name="int" c:type="int"/> + <type name="gint" c:type="int"/> </parameter> </parameters> </constructor> @@ -75,7 +75,7 @@ and/or use gtk-doc annotations. --> </method> <method name="equals" c:identifier="regress_test_boxed_equals"> <return-value transfer-ownership="none"> - <type name="boolean" c:type="gboolean"/> + <type name="gboolean" c:type="gboolean"/> </return-value> <parameters> <parameter name="other" transfer-ownership="none"> @@ -88,16 +88,16 @@ and/or use gtk-doc annotations. --> </record> <callback name="TestCallback" c:type="RegressTestCallback"> <return-value transfer-ownership="none"> - <type name="int" c:type="int"/> + <type name="gint" c:type="int"/> </return-value> </callback> <callback name="TestCallbackUserData" c:type="RegressTestCallbackUserData"> <return-value transfer-ownership="none"> - <type name="int" c:type="int"/> + <type name="gint" c:type="int"/> </return-value> <parameters> <parameter name="user_data" transfer-ownership="none" closure="0"> - <type name="any" c:type="gpointer"/> + <type name="gpointer" c:type="gpointer"/> </parameter> </parameters> </callback> @@ -187,10 +187,10 @@ and/or use gtk-doc annotations. --> <type name="GObject.TypeInstance" c:type="GTypeInstance"/> </field> <field name="refcount"> - <type name="int" c:type="gint"/> + <type name="gint" c:type="gint"/> </field> <field name="flags"> - <type name="uint" c:type="guint"/> + <type name="guint" c:type="guint"/> </field> </class> <record name="TestFundamentalObjectClass" @@ -287,18 +287,6 @@ and/or use gtk-doc annotations. --> glib:type-name="RegressTestObj" glib:get-type="regress_test_obj_get_type" glib:type-struct="TestObjClass"> - <constructor name="new_from_file" - c:identifier="regress_test_obj_new_from_file" - throws="1"> - <return-value transfer-ownership="full"> - <type name="TestObj" c:type="RegressTestObj*"/> - </return-value> - <parameters> - <parameter name="x" transfer-ownership="none"> - <type name="utf8" c:type="char*"/> - </parameter> - </parameters> - </constructor> <constructor name="new_callback" c:identifier="regress_test_obj_new_callback"> <return-value transfer-ownership="full"> @@ -314,21 +302,33 @@ and/or use gtk-doc annotations. --> c:type="RegressTestCallbackUserData"/> </parameter> <parameter name="user_data" transfer-ownership="none"> - <type name="any" c:type="gpointer"/> + <type name="gpointer" c:type="gpointer"/> </parameter> <parameter name="notify" transfer-ownership="none" scope="call"> <type name="GLib.DestroyNotify" c:type="GDestroyNotify"/> </parameter> </parameters> </constructor> + <constructor name="new_from_file" + c:identifier="regress_test_obj_new_from_file" + throws="1"> + <return-value transfer-ownership="full"> + <type name="TestObj" c:type="RegressTestObj*"/> + </return-value> + <parameters> + <parameter name="x" transfer-ownership="none"> + <type name="utf8" c:type="char*"/> + </parameter> + </parameters> + </constructor> <function name="static_method" c:identifier="regress_test_obj_static_method"> <return-value transfer-ownership="none"> - <type name="double" c:type="double"/> + <type name="gdouble" c:type="double"/> </return-value> <parameters> <parameter name="x" transfer-ownership="none"> - <type name="int" c:type="int"/> + <type name="gint" c:type="int"/> </parameter> </parameters> </function> @@ -351,7 +351,7 @@ and/or use gtk-doc annotations. --> slot name, which makes it useful for testing bindings handle this case.</doc> <return-value transfer-ownership="none"> - <type name="int" c:type="int"/> + <type name="gint" c:type="int"/> </return-value> <parameters> <parameter name="somestr" transfer-ownership="none"> @@ -360,21 +360,59 @@ case.</doc> </parameter> </parameters> </virtual-method> - <method name="set_bare" c:identifier="regress_test_obj_set_bare"> + <method name="do_matrix" c:identifier="regress_test_obj_do_matrix"> + <doc xml:whitespace="preserve">This method is virtual. Notably its name differs from the virtual +slot name, which makes it useful for testing bindings handle this +case.</doc> <return-value transfer-ownership="none"> - <type name="none" c:type="void"/> + <type name="gint" c:type="int"/> </return-value> <parameters> - <parameter name="bare" transfer-ownership="none" allow-none="1"> - <type name="GObject.Object" c:type="GObject*"/> + <parameter name="somestr" transfer-ownership="none"> + <doc xml:whitespace="preserve">Meaningless string</doc> + <type name="utf8" c:type="char*"/> </parameter> </parameters> </method> <method name="instance_method" c:identifier="regress_test_obj_instance_method"> <return-value transfer-ownership="none"> - <type name="int" c:type="int"/> + <type name="gint" c:type="int"/> + </return-value> + </method> + <method name="instance_method_callback" + c:identifier="regress_test_obj_instance_method_callback"> + <return-value transfer-ownership="none"> + <type name="none" c:type="void"/> + </return-value> + <parameters> + <parameter name="callback" + transfer-ownership="none" + allow-none="1" + scope="call"> + <type name="TestCallback" c:type="RegressTestCallback"/> + </parameter> + </parameters> + </method> + <method name="null_in" c:identifier="regress_test_obj_null_in"> + <return-value transfer-ownership="none"> + <type name="none" c:type="void"/> + </return-value> + </method> + <method name="null_out" c:identifier="regress_test_obj_null_out"> + <return-value transfer-ownership="none"> + <type name="none" c:type="void"/> + </return-value> + </method> + <method name="set_bare" c:identifier="regress_test_obj_set_bare"> + <return-value transfer-ownership="none"> + <type name="none" c:type="void"/> </return-value> + <parameters> + <parameter name="bare" transfer-ownership="none" allow-none="1"> + <type name="GObject.Object" c:type="GObject*"/> + </parameter> + </parameters> </method> <method name="torture_signature_0" c:identifier="regress_test_obj_torture_signature_0"> @@ -383,19 +421,19 @@ case.</doc> </return-value> <parameters> <parameter name="x" transfer-ownership="none"> - <type name="int" c:type="int"/> + <type name="gint" c:type="int"/> </parameter> <parameter name="y" direction="out" caller-allocates="0" transfer-ownership="full"> - <type name="double" c:type="double*"/> + <type name="gdouble" c:type="double*"/> </parameter> <parameter name="z" direction="out" caller-allocates="0" transfer-ownership="full"> - <type name="int" c:type="int*"/> + <type name="gint" c:type="int*"/> </parameter> <parameter name="foo" transfer-ownership="none"> <type name="utf8" c:type="char*"/> @@ -404,10 +442,10 @@ case.</doc> direction="out" caller-allocates="0" transfer-ownership="full"> - <type name="int" c:type="int*"/> + <type name="gint" c:type="int*"/> </parameter> <parameter name="m" transfer-ownership="none"> - <type name="uint" c:type="guint"/> + <type name="guint" c:type="guint"/> </parameter> </parameters> </method> @@ -416,23 +454,23 @@ case.</doc> throws="1"> <doc xml:whitespace="preserve">This function throws an error if m is odd.</doc> <return-value transfer-ownership="none"> - <type name="boolean" c:type="gboolean"/> + <type name="gboolean" c:type="gboolean"/> </return-value> <parameters> <parameter name="x" transfer-ownership="none"> - <type name="int" c:type="int"/> + <type name="gint" c:type="int"/> </parameter> <parameter name="y" direction="out" caller-allocates="0" transfer-ownership="full"> - <type name="double" c:type="double*"/> + <type name="gdouble" c:type="double*"/> </parameter> <parameter name="z" direction="out" caller-allocates="0" transfer-ownership="full"> - <type name="int" c:type="int*"/> + <type name="gint" c:type="int*"/> </parameter> <parameter name="foo" transfer-ownership="none"> <type name="utf8" c:type="char*"/> @@ -441,48 +479,10 @@ case.</doc> direction="out" caller-allocates="0" transfer-ownership="full"> - <type name="int" c:type="int*"/> + <type name="gint" c:type="int*"/> </parameter> <parameter name="m" transfer-ownership="none"> - <type name="uint" c:type="guint"/> - </parameter> - </parameters> - </method> - <method name="do_matrix" c:identifier="regress_test_obj_do_matrix"> - <doc xml:whitespace="preserve">This method is virtual. Notably its name differs from the virtual -slot name, which makes it useful for testing bindings handle this -case.</doc> - <return-value transfer-ownership="none"> - <type name="int" c:type="int"/> - </return-value> - <parameters> - <parameter name="somestr" transfer-ownership="none"> - <doc xml:whitespace="preserve">Meaningless string</doc> - <type name="utf8" c:type="char*"/> - </parameter> - </parameters> - </method> - <method name="null_in" c:identifier="regress_test_obj_null_in"> - <return-value transfer-ownership="none"> - <type name="none" c:type="void"/> - </return-value> - </method> - <method name="null_out" c:identifier="regress_test_obj_null_out"> - <return-value transfer-ownership="none"> - <type name="none" c:type="void"/> - </return-value> - </method> - <method name="instance_method_callback" - c:identifier="regress_test_obj_instance_method_callback"> - <return-value transfer-ownership="none"> - <type name="none" c:type="void"/> - </return-value> - <parameters> - <parameter name="callback" - transfer-ownership="none" - allow-none="1" - scope="call"> - <type name="TestCallback" c:type="RegressTestCallback"/> + <type name="guint" c:type="guint"/> </parameter> </parameters> </method> @@ -501,7 +501,7 @@ case.</doc> <property name="hash-table" writable="1" transfer-ownership="container"> <type name="GLib.HashTable" c:type="GHashTable"> <type name="utf8"/> - <type name="int8"/> + <type name="gint8"/> </type> </property> <property name="int" writable="1" transfer-ownership="none"> @@ -529,7 +529,7 @@ case.</doc> </field> <field name="list"> <type name="GLib.List" c:type="GList*"> - <type name="any" c:type="gpointer"/> + <type name="gpointer" c:type="gpointer"/> </type> </field> <field name="some_int8"> @@ -569,7 +569,7 @@ case.</doc> <field name="matrix"> <callback name="matrix" c:type="matrix"> <return-value transfer-ownership="none"> - <type name="int" c:type="int"/> + <type name="gint" c:type="int"/> </return-value> <parameters> <parameter name="obj" transfer-ownership="none"> @@ -583,10 +583,10 @@ case.</doc> </callback> </field> <field name="test_signal"> - <type name="uint" c:type="guint"/> + <type name="guint" c:type="guint"/> </field> <field name="test_signal_with_static_scope_arg"> - <type name="uint" c:type="guint"/> + <type name="guint" c:type="guint"/> </field> </record> <record name="TestSimpleBoxedA" @@ -594,13 +594,13 @@ case.</doc> glib:type-name="RegressTestSimpleBoxedA" glib:get-type="regress_test_simple_boxed_a_get_type"> <field name="some_int" writable="1"> - <type name="int" c:type="gint"/> + <type name="gint" c:type="gint"/> </field> <field name="some_int8" writable="1"> - <type name="int8" c:type="gint8"/> + <type name="gint8" c:type="gint8"/> </field> <field name="some_double" writable="1"> - <type name="double" c:type="gdouble"/> + <type name="gdouble" c:type="gdouble"/> </field> <field name="some_enum" writable="1"> <type name="TestEnum" c:type="RegressTestEnum"/> @@ -612,7 +612,7 @@ case.</doc> </method> <method name="equals" c:identifier="regress_test_simple_boxed_a_equals"> <return-value transfer-ownership="none"> - <type name="boolean" c:type="gboolean"/> + <type name="gboolean" c:type="gboolean"/> </return-value> <parameters> <parameter name="other_a" transfer-ownership="none"> @@ -626,7 +626,7 @@ case.</doc> glib:type-name="RegressTestSimpleBoxedB" glib:get-type="regress_test_simple_boxed_b_get_type"> <field name="some_int8" writable="1"> - <type name="int8" c:type="gint8"/> + <type name="gint8" c:type="gint8"/> </field> <field name="nested_a" writable="1"> <type name="TestSimpleBoxedA" c:type="RegressTestSimpleBoxedA"/> @@ -644,13 +644,13 @@ case.</doc> </callback> <record name="TestStructA" c:type="RegressTestStructA"> <field name="some_int" writable="1"> - <type name="int" c:type="gint"/> + <type name="gint" c:type="gint"/> </field> <field name="some_int8" writable="1"> - <type name="int8" c:type="gint8"/> + <type name="gint8" c:type="gint8"/> </field> <field name="some_double" writable="1"> - <type name="double" c:type="gdouble"/> + <type name="gdouble" c:type="gdouble"/> </field> <field name="some_enum" writable="1"> <type name="TestEnum" c:type="RegressTestEnum"/> @@ -673,7 +673,7 @@ case.</doc> </record> <record name="TestStructB" c:type="RegressTestStructB"> <field name="some_int8" writable="1"> - <type name="int8" c:type="gint8"/> + <type name="gint8" c:type="gint8"/> </field> <field name="nested_a" writable="1"> <type name="TestStructA" c:type="RegressTestStructA"/> @@ -696,7 +696,7 @@ case.</doc> </record> <record name="TestStructC" c:type="_RegressTestStructC"> <field name="another_int" writable="1"> - <type name="int" c:type="gint"/> + <type name="gint" c:type="gint"/> </field> <field name="obj" writable="1"> <type name="GObject.Object" c:type="GObject*"/> @@ -713,15 +713,15 @@ case.</doc> <type name="TestSubObj" c:type="RegressTestSubObj*"/> </return-value> </constructor> - <method name="unset_bare" c:identifier="regress_test_sub_obj_unset_bare"> + <method name="instance_method" + c:identifier="regress_test_sub_obj_instance_method"> <return-value transfer-ownership="none"> - <type name="none" c:type="void"/> + <type name="gint" c:type="int"/> </return-value> </method> - <method name="instance_method" - c:identifier="regress_test_sub_obj_instance_method"> + <method name="unset_bare" c:identifier="regress_test_sub_obj_unset_bare"> <return-value transfer-ownership="none"> - <type name="int" c:type="int"/> + <type name="none" c:type="void"/> </return-value> </method> <field name="parent_instance"> @@ -749,18 +749,18 @@ case.</doc> <function name="static_method" c:identifier="regress_test_wi_802_1x_static_method"> <return-value transfer-ownership="none"> - <type name="int" c:type="int"/> + <type name="gint" c:type="int"/> </return-value> <parameters> <parameter name="x" transfer-ownership="none"> - <type name="int" c:type="int"/> + <type name="gint" c:type="int"/> </parameter> </parameters> </function> <method name="get_testbool" c:identifier="regress_test_wi_802_1x_get_testbool"> <return-value transfer-ownership="none"> - <type name="boolean" c:type="gboolean"/> + <type name="gboolean" c:type="gboolean"/> </return-value> </method> <method name="set_testbool" @@ -770,18 +770,18 @@ case.</doc> </return-value> <parameters> <parameter name="v" transfer-ownership="none"> - <type name="boolean" c:type="gboolean"/> + <type name="gboolean" c:type="gboolean"/> </parameter> </parameters> </method> <property name="testbool" writable="1" transfer-ownership="none"> - <type name="boolean" c:type="gboolean"/> + <type name="gboolean" c:type="gboolean"/> </property> <field name="parent_instance"> <type name="GObject.Object" c:type="GObject"/> </field> <field name="testbool"> - <type name="boolean" c:type="gboolean"/> + <type name="gboolean" c:type="gboolean"/> </field> </class> <record name="TestWi8021xClass" @@ -798,7 +798,7 @@ case.</doc> </return-value> <parameters> <parameter name="abort_on_error" transfer-ownership="none"> - <type name="boolean" c:type="gboolean"/> + <type name="gboolean" c:type="gboolean"/> </parameter> </parameters> </function> @@ -806,13 +806,13 @@ case.</doc> c:identifier="regress_test_array_fixed_size_int_in"> <return-value transfer-ownership="none"> <doc xml:whitespace="preserve">the sum of the items in @ints</doc> - <type name="int" c:type="int"/> + <type name="gint" c:type="int"/> </return-value> <parameters> <parameter name="ints" transfer-ownership="none"> <doc xml:whitespace="preserve">a list of 5 integers</doc> <array c:type="int*" fixed-size="5"> - <type name="int"/> + <type name="gint"/> </array> </parameter> </parameters> @@ -829,7 +829,7 @@ case.</doc> transfer-ownership="full"> <doc xml:whitespace="preserve">a list of 5 integers ranging from 0 to 4</doc> <array c:type="int**" fixed-size="5"> - <type name="int"/> + <type name="gint"/> </array> </parameter> </parameters> @@ -839,23 +839,23 @@ case.</doc> <return-value transfer-ownership="full"> <doc xml:whitespace="preserve">a list of 5 integers ranging from 0 to 4</doc> <array c:type="int*" fixed-size="5"> - <type name="int"/> + <type name="gint"/> </array> </return-value> </function> <function name="test_array_gint16_in" c:identifier="regress_test_array_gint16_in"> <return-value transfer-ownership="none"> - <type name="int" c:type="int"/> + <type name="gint" c:type="int"/> </return-value> <parameters> <parameter name="n_ints" transfer-ownership="none"> - <type name="int" c:type="int"/> + <type name="gint" c:type="int"/> </parameter> <parameter name="ints" transfer-ownership="none"> <doc xml:whitespace="preserve">List of ints</doc> <array length="0" c:type="gint16*"> - <type name="int16"/> + <type name="gint16"/> </array> </parameter> </parameters> @@ -863,16 +863,16 @@ case.</doc> <function name="test_array_gint32_in" c:identifier="regress_test_array_gint32_in"> <return-value transfer-ownership="none"> - <type name="int32" c:type="gint32"/> + <type name="gint32" c:type="gint32"/> </return-value> <parameters> <parameter name="n_ints" transfer-ownership="none"> - <type name="int" c:type="int"/> + <type name="gint" c:type="int"/> </parameter> <parameter name="ints" transfer-ownership="none"> <doc xml:whitespace="preserve">List of ints</doc> <array length="0" c:type="gint32*"> - <type name="int32"/> + <type name="gint32"/> </array> </parameter> </parameters> @@ -880,16 +880,16 @@ case.</doc> <function name="test_array_gint64_in" c:identifier="regress_test_array_gint64_in"> <return-value transfer-ownership="none"> - <type name="int64" c:type="gint64"/> + <type name="gint64" c:type="gint64"/> </return-value> <parameters> <parameter name="n_ints" transfer-ownership="none"> - <type name="int" c:type="int"/> + <type name="gint" c:type="int"/> </parameter> <parameter name="ints" transfer-ownership="none"> <doc xml:whitespace="preserve">List of ints</doc> <array length="0" c:type="gint64*"> - <type name="int64"/> + <type name="gint64"/> </array> </parameter> </parameters> @@ -897,16 +897,16 @@ case.</doc> <function name="test_array_gint8_in" c:identifier="regress_test_array_gint8_in"> <return-value transfer-ownership="none"> - <type name="int" c:type="int"/> + <type name="gint" c:type="int"/> </return-value> <parameters> <parameter name="n_ints" transfer-ownership="none"> - <type name="int" c:type="int"/> + <type name="gint" c:type="int"/> </parameter> <parameter name="ints" transfer-ownership="none"> <doc xml:whitespace="preserve">List of ints</doc> <array length="0" c:type="gint8*"> - <type name="int8"/> + <type name="gint8"/> </array> </parameter> </parameters> @@ -919,7 +919,7 @@ case.</doc> </return-value> <parameters> <parameter name="n_types" transfer-ownership="none"> - <type name="int" c:type="int"/> + <type name="gint" c:type="int"/> </parameter> <parameter name="types" transfer-ownership="none"> <doc xml:whitespace="preserve">List of types</doc> @@ -934,7 +934,7 @@ case.</doc> <return-value transfer-ownership="full"> <doc xml:whitespace="preserve">a new array of integers.</doc> <array length="0" c:type="int*"> - <type name="int"/> + <type name="gint"/> </array> </return-value> <parameters> @@ -943,23 +943,23 @@ case.</doc> caller-allocates="0" transfer-ownership="full"> <doc xml:whitespace="preserve">length of the returned array.</doc> - <type name="int" c:type="int*"/> + <type name="gint" c:type="int*"/> </parameter> </parameters> </function> <function name="test_array_int_in" c:identifier="regress_test_array_int_in"> <return-value transfer-ownership="none"> - <type name="int" c:type="int"/> + <type name="gint" c:type="int"/> </return-value> <parameters> <parameter name="n_ints" transfer-ownership="none"> - <type name="int" c:type="int"/> + <type name="gint" c:type="int"/> </parameter> <parameter name="ints" transfer-ownership="none"> <doc xml:whitespace="preserve">List of ints</doc> <array length="0" c:type="int*"> - <type name="int"/> + <type name="gint"/> </array> </parameter> </parameters> @@ -967,16 +967,16 @@ case.</doc> <function name="test_array_int_in_take" c:identifier="regress_test_array_int_in_take"> <return-value transfer-ownership="none"> - <type name="int" c:type="int"/> + <type name="gint" c:type="int"/> </return-value> <parameters> <parameter name="n_ints" transfer-ownership="none"> - <type name="int" c:type="int"/> + <type name="gint" c:type="int"/> </parameter> <parameter name="ints" transfer-ownership="full"> <doc xml:whitespace="preserve">List of ints</doc> <array length="0" c:type="int*"> - <type name="int"/> + <type name="gint"/> </array> </parameter> </parameters> @@ -992,7 +992,7 @@ case.</doc> caller-allocates="0" transfer-ownership="full"> <doc xml:whitespace="preserve">the length of @ints</doc> - <type name="int" c:type="int*"/> + <type name="gint" c:type="int*"/> </parameter> <parameter name="ints" direction="inout" @@ -1000,7 +1000,7 @@ case.</doc> transfer-ownership="full"> <doc xml:whitespace="preserve">a list of integers whose items will be increased by 1, except the first that will be dropped</doc> <array length="0" c:type="int**"> - <type name="int"/> + <type name="gint"/> </array> </parameter> </parameters> @@ -1010,7 +1010,7 @@ case.</doc> <return-value transfer-ownership="none"> <doc xml:whitespace="preserve">a static array of integers.</doc> <array length="0" c:type="int*"> - <type name="int"/> + <type name="gint"/> </array> </return-value> <parameters> @@ -1019,7 +1019,7 @@ case.</doc> caller-allocates="0" transfer-ownership="full"> <doc xml:whitespace="preserve">length of the returned array.</doc> - <type name="int" c:type="int*"/> + <type name="gint" c:type="int*"/> </parameter> </parameters> </function> @@ -1031,12 +1031,12 @@ case.</doc> <parameters> <parameter name="arr" transfer-ownership="none" allow-none="1"> <array length="1" c:type="int*"> - <type name="int"/> + <type name="gint"/> </array> </parameter> <parameter name="len" transfer-ownership="none"> <doc xml:whitespace="preserve">length</doc> - <type name="int" c:type="int"/> + <type name="gint" c:type="int"/> </parameter> </parameters> </function> @@ -1052,7 +1052,7 @@ case.</doc> transfer-ownership="full" allow-none="1"> <array length="1" c:type="int**"> - <type name="int"/> + <type name="gint"/> </array> </parameter> <parameter name="len" @@ -1060,7 +1060,7 @@ case.</doc> caller-allocates="0" transfer-ownership="full"> <doc xml:whitespace="preserve">length</doc> - <type name="int" c:type="int*"/> + <type name="gint" c:type="int*"/> </parameter> </parameters> </function> @@ -1075,7 +1075,7 @@ case.</doc> caller-allocates="0" transfer-ownership="full"> <doc xml:whitespace="preserve">the length of @ints</doc> - <type name="int" c:type="int*"/> + <type name="gint" c:type="int*"/> </parameter> <parameter name="ints" direction="out" @@ -1083,7 +1083,7 @@ case.</doc> transfer-ownership="full"> <doc xml:whitespace="preserve">a list of 5 integers, from 0 to 4 in consecutive order</doc> <array length="0" c:type="int**"> - <type name="int"/> + <type name="gint"/> </array> </parameter> </parameters> @@ -1101,33 +1101,33 @@ case.</doc> </function> <function name="test_boolean" c:identifier="regress_test_boolean"> <return-value transfer-ownership="none"> - <type name="boolean" c:type="gboolean"/> + <type name="gboolean" c:type="gboolean"/> </return-value> <parameters> <parameter name="in" transfer-ownership="none"> - <type name="boolean" c:type="gboolean"/> + <type name="gboolean" c:type="gboolean"/> </parameter> </parameters> </function> <function name="test_boolean_false" c:identifier="regress_test_boolean_false"> <return-value transfer-ownership="none"> - <type name="boolean" c:type="gboolean"/> + <type name="gboolean" c:type="gboolean"/> </return-value> <parameters> <parameter name="in" transfer-ownership="none"> - <type name="boolean" c:type="gboolean"/> + <type name="gboolean" c:type="gboolean"/> </parameter> </parameters> </function> <function name="test_boolean_true" c:identifier="regress_test_boolean_true"> <return-value transfer-ownership="none"> - <type name="boolean" c:type="gboolean"/> + <type name="gboolean" c:type="gboolean"/> </return-value> <parameters> <parameter name="in" transfer-ownership="none"> - <type name="boolean" c:type="gboolean"/> + <type name="gboolean" c:type="gboolean"/> </parameter> </parameters> </function> @@ -1187,7 +1187,7 @@ case.</doc> </function> <function name="test_callback" c:identifier="regress_test_callback"> <return-value transfer-ownership="none"> - <type name="int" c:type="int"/> + <type name="gint" c:type="int"/> </return-value> <parameters> <parameter name="callback" @@ -1212,7 +1212,7 @@ case.</doc> c:type="RegressTestCallbackUserData"/> </parameter> <parameter name="user_data" transfer-ownership="none"> - <type name="any" c:type="gpointer"/> + <type name="gpointer" c:type="gpointer"/> </parameter> </parameters> </function> @@ -1221,7 +1221,7 @@ case.</doc> <doc xml:whitespace="preserve">Notified - callback persists until a DestroyNotify delegate is invoked.</doc> <return-value transfer-ownership="none"> - <type name="int" c:type="int"/> + <type name="gint" c:type="int"/> </return-value> <parameters> <parameter name="callback" @@ -1233,7 +1233,7 @@ is invoked.</doc> c:type="RegressTestCallbackUserData"/> </parameter> <parameter name="user_data" transfer-ownership="none"> - <type name="any" c:type="gpointer"/> + <type name="gpointer" c:type="gpointer"/> </parameter> <parameter name="notify" transfer-ownership="none" scope="call"> <type name="GLib.DestroyNotify" c:type="GDestroyNotify"/> @@ -1243,7 +1243,7 @@ is invoked.</doc> <function name="test_callback_thaw_async" c:identifier="regress_test_callback_thaw_async"> <return-value transfer-ownership="none"> - <type name="int" c:type="int"/> + <type name="gint" c:type="int"/> </return-value> </function> <function name="test_callback_thaw_notifications" @@ -1253,7 +1253,7 @@ adding up their return values, and removes them, invoking the corresponding destroy notfications.</doc> <return-value transfer-ownership="none"> <doc xml:whitespace="preserve">Sum of the return values of the invoked callbacks.</doc> - <type name="int" c:type="int"/> + <type name="gint" c:type="int"/> </return-value> </function> <function name="test_callback_user_data" @@ -1261,7 +1261,7 @@ corresponding destroy notfications.</doc> <doc xml:whitespace="preserve">Call - callback parameter persists for the duration of the method call and can be released on return.</doc> <return-value transfer-ownership="none"> - <type name="int" c:type="int"/> + <type name="gint" c:type="int"/> </return-value> <parameters> <parameter name="callback" @@ -1272,13 +1272,13 @@ call and can be released on return.</doc> c:type="RegressTestCallbackUserData"/> </parameter> <parameter name="user_data" transfer-ownership="none"> - <type name="any" c:type="gpointer"/> + <type name="gpointer" c:type="gpointer"/> </parameter> </parameters> </function> <function name="test_closure" c:identifier="regress_test_closure"> <return-value transfer-ownership="none"> - <type name="int" c:type="int"/> + <type name="gint" c:type="int"/> </return-value> <parameters> <parameter name="closure" transfer-ownership="none"> @@ -1289,14 +1289,14 @@ call and can be released on return.</doc> <function name="test_closure_one_arg" c:identifier="regress_test_closure_one_arg"> <return-value transfer-ownership="none"> - <type name="int" c:type="int"/> + <type name="gint" c:type="int"/> </return-value> <parameters> <parameter name="closure" transfer-ownership="none"> <type name="GObject.Closure" c:type="GClosure*"/> </parameter> <parameter name="arg" transfer-ownership="none"> - <type name="int" c:type="int"/> + <type name="gint" c:type="int"/> </parameter> </parameters> </function> @@ -1308,11 +1308,11 @@ call and can be released on return.</doc> </function> <function name="test_double" c:identifier="regress_test_double"> <return-value transfer-ownership="none"> - <type name="double" c:type="gdouble"/> + <type name="gdouble" c:type="gdouble"/> </return-value> <parameters> <parameter name="in" transfer-ownership="none"> - <type name="double" c:type="gdouble"/> + <type name="gdouble" c:type="gdouble"/> </parameter> </parameters> </function> @@ -1337,11 +1337,11 @@ call and can be released on return.</doc> </function> <function name="test_float" c:identifier="regress_test_float"> <return-value transfer-ownership="none"> - <type name="float" c:type="gfloat"/> + <type name="gfloat" c:type="gfloat"/> </return-value> <parameters> <parameter name="in" transfer-ownership="none"> - <type name="float" c:type="gfloat"/> + <type name="gfloat" c:type="gfloat"/> </parameter> </parameters> </function> @@ -1781,51 +1781,51 @@ call and can be released on return.</doc> </function> <function name="test_int" c:identifier="regress_test_int"> <return-value transfer-ownership="none"> - <type name="int" c:type="gint"/> + <type name="gint" c:type="gint"/> </return-value> <parameters> <parameter name="in" transfer-ownership="none"> - <type name="int" c:type="gint"/> + <type name="gint" c:type="gint"/> </parameter> </parameters> </function> <function name="test_int16" c:identifier="regress_test_int16"> <return-value transfer-ownership="none"> - <type name="int16" c:type="gint16"/> + <type name="gint16" c:type="gint16"/> </return-value> <parameters> <parameter name="in" transfer-ownership="none"> - <type name="int16" c:type="gint16"/> + <type name="gint16" c:type="gint16"/> </parameter> </parameters> </function> <function name="test_int32" c:identifier="regress_test_int32"> <return-value transfer-ownership="none"> - <type name="int32" c:type="gint32"/> + <type name="gint32" c:type="gint32"/> </return-value> <parameters> <parameter name="in" transfer-ownership="none"> - <type name="int32" c:type="gint32"/> + <type name="gint32" c:type="gint32"/> </parameter> </parameters> </function> <function name="test_int64" c:identifier="regress_test_int64"> <return-value transfer-ownership="none"> - <type name="int64" c:type="gint64"/> + <type name="gint64" c:type="gint64"/> </return-value> <parameters> <parameter name="in" transfer-ownership="none"> - <type name="int64" c:type="gint64"/> + <type name="gint64" c:type="gint64"/> </parameter> </parameters> </function> <function name="test_int8" c:identifier="regress_test_int8"> <return-value transfer-ownership="none"> - <type name="int8" c:type="gint8"/> + <type name="gint8" c:type="gint8"/> </return-value> <parameters> <parameter name="in" transfer-ownership="none"> - <type name="int8" c:type="gint8"/> + <type name="gint8" c:type="gint8"/> </parameter> </parameters> </function> @@ -1839,7 +1839,7 @@ call and can be released on return.</doc> direction="out" caller-allocates="0" transfer-ownership="full"> - <type name="int" c:type="int*"/> + <type name="gint" c:type="int*"/> </parameter> <parameter name="in" transfer-ownership="none"> <type name="utf8" c:type="char*"/> @@ -1849,7 +1849,7 @@ call and can be released on return.</doc> <function name="test_int_value_arg" c:identifier="regress_test_int_value_arg"> <return-value transfer-ownership="none"> - <type name="int" c:type="int"/> + <type name="gint" c:type="int"/> </return-value> <parameters> <parameter name="v" transfer-ownership="none"> @@ -1859,18 +1859,18 @@ call and can be released on return.</doc> </function> <function name="test_long" c:identifier="regress_test_long"> <return-value transfer-ownership="none"> - <type name="long" c:type="glong"/> + <type name="glong" c:type="glong"/> </return-value> <parameters> <parameter name="in" transfer-ownership="none"> - <type name="long" c:type="glong"/> + <type name="glong" c:type="glong"/> </parameter> </parameters> </function> <function name="test_multi_callback" c:identifier="regress_test_multi_callback"> <return-value transfer-ownership="none"> - <type name="int" c:type="int"/> + <type name="gint" c:type="int"/> </return-value> <parameters> <parameter name="callback" @@ -1888,29 +1888,29 @@ call and can be released on return.</doc> </return-value> <parameters> <parameter name="in" transfer-ownership="none"> - <type name="double" c:type="gdouble"/> + <type name="gdouble" c:type="gdouble"/> </parameter> <parameter name="one" direction="out" caller-allocates="0" transfer-ownership="full"> - <type name="double" c:type="gdouble*"/> + <type name="gdouble" c:type="gdouble*"/> </parameter> <parameter name="two" direction="out" caller-allocates="0" transfer-ownership="full"> - <type name="double" c:type="gdouble*"/> + <type name="gdouble" c:type="gdouble*"/> </parameter> </parameters> </function> <function name="test_short" c:identifier="regress_test_short"> <return-value transfer-ownership="none"> - <type name="short" c:type="gshort"/> + <type name="gshort" c:type="gshort"/> </return-value> <parameters> <parameter name="in" transfer-ownership="none"> - <type name="short" c:type="gshort"/> + <type name="gshort" c:type="gshort"/> </parameter> </parameters> </function> @@ -1936,27 +1936,27 @@ call and can be released on return.</doc> </function> <function name="test_size" c:identifier="regress_test_size"> <return-value transfer-ownership="none"> - <type name="gsize" c:type="gsize"/> + <type name="gulong" c:type="gsize"/> </return-value> <parameters> <parameter name="in" transfer-ownership="none"> - <type name="gsize" c:type="gsize"/> + <type name="gulong" c:type="gsize"/> </parameter> </parameters> </function> <function name="test_ssize" c:identifier="regress_test_ssize"> <return-value transfer-ownership="none"> - <type name="gssize" c:type="gssize"/> + <type name="glong" c:type="gssize"/> </return-value> <parameters> <parameter name="in" transfer-ownership="none"> - <type name="gssize" c:type="gssize"/> + <type name="glong" c:type="gssize"/> </parameter> </parameters> </function> <function name="test_strv_in" c:identifier="regress_test_strv_in"> <return-value transfer-ownership="none"> - <type name="boolean" c:type="gboolean"/> + <type name="gboolean" c:type="gboolean"/> </return-value> <parameters> <parameter name="arr" transfer-ownership="none"> @@ -1969,7 +1969,7 @@ call and can be released on return.</doc> <function name="test_strv_in_container" c:identifier="regress_test_strv_in_container"> <return-value transfer-ownership="none"> - <type name="boolean" c:type="gboolean"/> + <type name="gboolean" c:type="gboolean"/> </return-value> <parameters> <parameter name="arr" transfer-ownership="container"> @@ -2026,11 +2026,11 @@ call and can be released on return.</doc> </function> <function name="test_timet" c:identifier="regress_test_timet"> <return-value transfer-ownership="none"> - <type name="long" c:type="time_t"/> + <type name="glong" c:type="time_t"/> </return-value> <parameters> <parameter name="in" transfer-ownership="none"> - <type name="long" c:type="time_t"/> + <type name="glong" c:type="time_t"/> </parameter> </parameters> </function> @@ -2041,19 +2041,19 @@ call and can be released on return.</doc> </return-value> <parameters> <parameter name="x" transfer-ownership="none"> - <type name="int" c:type="int"/> + <type name="gint" c:type="int"/> </parameter> <parameter name="y" direction="out" caller-allocates="0" transfer-ownership="full"> - <type name="double" c:type="double*"/> + <type name="gdouble" c:type="double*"/> </parameter> <parameter name="z" direction="out" caller-allocates="0" transfer-ownership="full"> - <type name="int" c:type="int*"/> + <type name="gint" c:type="int*"/> </parameter> <parameter name="foo" transfer-ownership="none"> <type name="utf8" c:type="char*"/> @@ -2062,10 +2062,10 @@ call and can be released on return.</doc> direction="out" caller-allocates="0" transfer-ownership="full"> - <type name="int" c:type="int*"/> + <type name="gint" c:type="int*"/> </parameter> <parameter name="m" transfer-ownership="none"> - <type name="uint" c:type="guint"/> + <type name="guint" c:type="guint"/> </parameter> </parameters> </function> @@ -2074,23 +2074,23 @@ call and can be released on return.</doc> throws="1"> <doc xml:whitespace="preserve">This function throws an error if m is odd.</doc> <return-value transfer-ownership="none"> - <type name="boolean" c:type="gboolean"/> + <type name="gboolean" c:type="gboolean"/> </return-value> <parameters> <parameter name="x" transfer-ownership="none"> - <type name="int" c:type="int"/> + <type name="gint" c:type="int"/> </parameter> <parameter name="y" direction="out" caller-allocates="0" transfer-ownership="full"> - <type name="double" c:type="double*"/> + <type name="gdouble" c:type="double*"/> </parameter> <parameter name="z" direction="out" caller-allocates="0" transfer-ownership="full"> - <type name="int" c:type="int*"/> + <type name="gint" c:type="int*"/> </parameter> <parameter name="foo" transfer-ownership="none"> <type name="utf8" c:type="char*"/> @@ -2099,10 +2099,10 @@ call and can be released on return.</doc> direction="out" caller-allocates="0" transfer-ownership="full"> - <type name="int" c:type="int*"/> + <type name="gint" c:type="int*"/> </parameter> <parameter name="m" transfer-ownership="none"> - <type name="uint" c:type="guint"/> + <type name="guint" c:type="guint"/> </parameter> </parameters> </function> @@ -2113,7 +2113,7 @@ call and can be released on return.</doc> </return-value> <parameters> <parameter name="x" transfer-ownership="none"> - <type name="int" c:type="int"/> + <type name="gint" c:type="int"/> </parameter> <parameter name="callback" transfer-ownership="none" @@ -2124,7 +2124,7 @@ call and can be released on return.</doc> c:type="RegressTestCallbackUserData"/> </parameter> <parameter name="user_data" transfer-ownership="none"> - <type name="any" c:type="gpointer"/> + <type name="gpointer" c:type="gpointer"/> </parameter> <parameter name="notify" transfer-ownership="none" scope="call"> <type name="GLib.DestroyNotify" c:type="GDestroyNotify"/> @@ -2133,13 +2133,13 @@ call and can be released on return.</doc> direction="out" caller-allocates="0" transfer-ownership="full"> - <type name="double" c:type="double*"/> + <type name="gdouble" c:type="double*"/> </parameter> <parameter name="z" direction="out" caller-allocates="0" transfer-ownership="full"> - <type name="int" c:type="int*"/> + <type name="gint" c:type="int*"/> </parameter> <parameter name="foo" transfer-ownership="none"> <type name="utf8" c:type="char*"/> @@ -2148,80 +2148,80 @@ call and can be released on return.</doc> direction="out" caller-allocates="0" transfer-ownership="full"> - <type name="int" c:type="int*"/> + <type name="gint" c:type="int*"/> </parameter> <parameter name="m" transfer-ownership="none"> - <type name="uint" c:type="guint"/> + <type name="guint" c:type="guint"/> </parameter> </parameters> </function> <function name="test_uint" c:identifier="regress_test_uint"> <return-value transfer-ownership="none"> - <type name="uint" c:type="guint"/> + <type name="guint" c:type="guint"/> </return-value> <parameters> <parameter name="in" transfer-ownership="none"> - <type name="uint" c:type="guint"/> + <type name="guint" c:type="guint"/> </parameter> </parameters> </function> <function name="test_uint16" c:identifier="regress_test_uint16"> <return-value transfer-ownership="none"> - <type name="uint16" c:type="guint16"/> + <type name="guint16" c:type="guint16"/> </return-value> <parameters> <parameter name="in" transfer-ownership="none"> - <type name="uint16" c:type="guint16"/> + <type name="guint16" c:type="guint16"/> </parameter> </parameters> </function> <function name="test_uint32" c:identifier="regress_test_uint32"> <return-value transfer-ownership="none"> - <type name="uint32" c:type="guint32"/> + <type name="guint32" c:type="guint32"/> </return-value> <parameters> <parameter name="in" transfer-ownership="none"> - <type name="uint32" c:type="guint32"/> + <type name="guint32" c:type="guint32"/> </parameter> </parameters> </function> <function name="test_uint64" c:identifier="regress_test_uint64"> <return-value transfer-ownership="none"> - <type name="uint64" c:type="guint64"/> + <type name="guint64" c:type="guint64"/> </return-value> <parameters> <parameter name="in" transfer-ownership="none"> - <type name="uint64" c:type="guint64"/> + <type name="guint64" c:type="guint64"/> </parameter> </parameters> </function> <function name="test_uint8" c:identifier="regress_test_uint8"> <return-value transfer-ownership="none"> - <type name="uint8" c:type="guint8"/> + <type name="guint8" c:type="guint8"/> </return-value> <parameters> <parameter name="in" transfer-ownership="none"> - <type name="uint8" c:type="guint8"/> + <type name="guint8" c:type="guint8"/> </parameter> </parameters> </function> <function name="test_ulong" c:identifier="regress_test_ulong"> <return-value transfer-ownership="none"> - <type name="ulong" c:type="gulong"/> + <type name="gulong" c:type="gulong"/> </return-value> <parameters> <parameter name="in" transfer-ownership="none"> - <type name="ulong" c:type="gulong"/> + <type name="gulong" c:type="gulong"/> </parameter> </parameters> </function> <function name="test_ushort" c:identifier="regress_test_ushort"> <return-value transfer-ownership="none"> - <type name="ushort" c:type="gushort"/> + <type name="gushort" c:type="gushort"/> </return-value> <parameters> <parameter name="in" transfer-ownership="none"> - <type name="ushort" c:type="gushort"/> + <type name="gushort" c:type="gushort"/> </parameter> </parameters> </function> @@ -2374,7 +2374,7 @@ call and can be released on return.</doc> <parameters> <parameter name="i" transfer-ownership="none"> <doc xml:whitespace="preserve">an int</doc> - <type name="int" c:type="int"/> + <type name="gint" c:type="int"/> </parameter> </parameters> </function> diff --git a/tests/scanner/TestInherit-1.0-expected.gir b/tests/scanner/TestInherit-1.0-expected.gir index 3c82fb33..1d8a262a 100644 --- a/tests/scanner/TestInherit-1.0-expected.gir +++ b/tests/scanner/TestInherit-1.0-expected.gir @@ -27,7 +27,19 @@ and/or use gtk-doc annotations. --> </return-value> <parameters> <parameter name="x" transfer-ownership="none"> - <type name="int" c:type="int"/> + <type name="gint" c:type="int"/> + </parameter> + </parameters> + </method> + <method name="do_foo_maybe_throw" + c:identifier="test_inherit_drawable_do_foo_maybe_throw" + throws="1"> + <return-value transfer-ownership="none"> + <type name="none" c:type="void"/> + </return-value> + <parameters> + <parameter name="x" transfer-ownership="none"> + <type name="gint" c:type="int"/> </parameter> </parameters> </method> @@ -41,13 +53,13 @@ and/or use gtk-doc annotations. --> direction="out" caller-allocates="0" transfer-ownership="full"> - <type name="int" c:type="int*"/> + <type name="gint" c:type="int*"/> </parameter> <parameter name="y" direction="out" caller-allocates="0" transfer-ownership="full"> - <type name="int" c:type="int*"/> + <type name="gint" c:type="int*"/> </parameter> </parameters> </method> @@ -60,25 +72,13 @@ and/or use gtk-doc annotations. --> direction="out" caller-allocates="0" transfer-ownership="full"> - <type name="uint" c:type="guint*"/> + <type name="guint" c:type="guint*"/> </parameter> <parameter name="height" direction="out" caller-allocates="0" transfer-ownership="full"> - <type name="uint" c:type="guint*"/> - </parameter> - </parameters> - </method> - <method name="do_foo_maybe_throw" - c:identifier="test_inherit_drawable_do_foo_maybe_throw" - throws="1"> - <return-value transfer-ownership="none"> - <type name="none" c:type="void"/> - </return-value> - <parameters> - <parameter name="x" transfer-ownership="none"> - <type name="int" c:type="int"/> + <type name="guint" c:type="guint*"/> </parameter> </parameters> </method> diff --git a/tests/scanner/Utility-1.0-expected.gir b/tests/scanner/Utility-1.0-expected.gir index 6bf37446..7fbbed4a 100644 --- a/tests/scanner/Utility-1.0-expected.gir +++ b/tests/scanner/Utility-1.0-expected.gir @@ -14,26 +14,26 @@ and/or use gtk-doc annotations. --> shared-library="libutility.so" c:prefix="Utility"> <alias name="Glyph" c:type="UtilityGlyph"> - <type name="uint32"/> + <type name="guint32"/> </alias> <record name="Buffer" c:type="UtilityBuffer"> <field name="data" writable="1"> - <type name="any" c:type="char*"/> + <type name="GLib.pointer" c:type="char*"/> </field> <field name="length" writable="1"> - <type name="gsize" c:type="gsize"/> + <type name="gulong" c:type="gsize"/> </field> </record> <union name="Byte" c:type="UtilityByte"> <field name="value" writable="1"> - <type name="uint8" c:type="guint8"/> + <type name="guint8" c:type="guint8"/> </field> <record> <field name="first_nibble" writable="1" bits="4"> - <type name="uint8" c:type="guint8"/> + <type name="guint8" c:type="guint8"/> </field> <field name="second_nibble" writable="1" bits="4"> - <type name="uint8" c:type="guint8"/> + <type name="guint8" c:type="guint8"/> </field> </record> </union> @@ -51,7 +51,7 @@ and/or use gtk-doc annotations. --> <type name="utf8" c:type="char*"/> </parameter> <parameter name="user_data" transfer-ownership="none" closure="1"> - <type name="any" c:type="gpointer"/> + <type name="gpointer" c:type="gpointer"/> </parameter> </parameters> </callback> @@ -82,7 +82,7 @@ and/or use gtk-doc annotations. --> <type name="FileFunc" c:type="UtilityFileFunc"/> </parameter> <parameter name="user_data" transfer-ownership="none"> - <type name="any" c:type="gpointer"/> + <type name="gpointer" c:type="gpointer"/> </parameter> <parameter name="destroy" transfer-ownership="none" scope="call"> <type name="GLib.DestroyNotify" c:type="GDestroyNotify"/> @@ -102,33 +102,33 @@ and/or use gtk-doc annotations. --> </record> <record name="Struct" c:type="UtilityStruct"> <field name="field" writable="1"> - <type name="int" c:type="int"/> + <type name="gint" c:type="int"/> </field> <field name="bitfield1" writable="1" bits="3"> - <type name="uint" c:type="guint"/> + <type name="guint" c:type="guint"/> </field> <field name="bitfield2" writable="1" bits="2"> - <type name="uint" c:type="guint"/> + <type name="guint" c:type="guint"/> </field> <field name="data" writable="1"> <array zero-terminated="0" c:type="guint8" fixed-size="16"> - <type name="uint8"/> + <type name="guint8"/> </array> </field> </record> <record name="TaggedValue" c:type="UtilityTaggedValue"> <field name="tag" writable="1"> - <type name="int" c:type="int"/> + <type name="gint" c:type="int"/> </field> <union> <field name="v_pointer" writable="1"> - <type name="any" c:type="gpointer"/> + <type name="gpointer" c:type="gpointer"/> </field> <field name="v_real" writable="1"> - <type name="double" c:type="double"/> + <type name="gdouble" c:type="double"/> </field> <field name="v_integer" writable="1"> - <type name="long" c:type="long"/> + <type name="glong" c:type="long"/> </field> </union> </record> @@ -137,10 +137,10 @@ and/or use gtk-doc annotations. --> <type name="utf8" c:type="char*"/> </field> <field name="integer" writable="1"> - <type name="long" c:type="glong"/> + <type name="glong" c:type="glong"/> </field> <field name="real" writable="1"> - <type name="double" c:type="double"/> + <type name="gdouble" c:type="double"/> </field> </union> <function name="dir_foreach" c:identifier="utility_dir_foreach"> @@ -158,7 +158,7 @@ and/or use gtk-doc annotations. --> <type name="FileFunc" c:type="UtilityFileFunc"/> </parameter> <parameter name="user_data" transfer-ownership="none"> - <type name="any" c:type="gpointer"/> + <type name="gpointer" c:type="gpointer"/> </parameter> </parameters> </function> diff --git a/tests/scanner/annotation.c b/tests/scanner/annotation.c index 497d1eec..015fd833 100644 --- a/tests/scanner/annotation.c +++ b/tests/scanner/annotation.c @@ -520,7 +520,7 @@ annotation_object_set_data2 (AnnotationObject *object, /** * annotation_object_set_data3: * @object: a #AnnotationObject - * @data: (array length=length) (element-type uint8): The data + * @data: (array length=length) (element-type guint8): The data * @length: Length of the data * * Test taking a gchar * with a length, overriding the array element |