]> gitweb.factorcode.org Git - factor.git/commitdiff
start to write tests for 'gobject-introspection'; small fixes
authorAnton Gorenko <ex.rzrjck@gmail.com>
Tue, 31 Aug 2010 17:01:39 +0000 (23:01 +0600)
committerAnton Gorenko <ex.rzrjck@gmail.com>
Tue, 31 Aug 2010 17:01:39 +0000 (23:01 +0600)
basis/glib/ffi/ffi.factor
basis/gobject-introspection/loader/loader.factor
basis/gobject-introspection/tests/g-i-marshalling-tests/GIMarshallingTests-1.0.gir [new file with mode: 0644]
basis/gobject-introspection/tests/g-i-marshalling-tests/ffi/ffi.factor [new file with mode: 0644]
basis/gobject-introspection/tests/g-i-marshalling-tests/g-i-marshalling-tests.factor [new file with mode: 0644]
basis/gobject-introspection/tests/marshalling.factor [new file with mode: 0644]
basis/gobject/ffi/ffi.factor

index f810348aa0685cc734e2b67a7c19bda4e1cb6f27..405c25025fe8e9555555a2b6f4a1b43087adf471 100644 (file)
@@ -1,8 +1,9 @@
 ! Copyright (C) 2009 Anton Gorenko.
 ! See http://factorcode.org/license.txt for BSD license.
 USING: accessors alien alien.c-types alien.destructors
-alien.libraries alien.syntax combinators compiler.units
-gobject-introspection kernel system vocabs.parser words ;
+alien.libraries alien.syntax classes.struct combinators
+compiler.units gobject-introspection kernel system vocabs.parser
+words ;
 IN: glib.ffi
 
 <<
@@ -64,11 +65,26 @@ TYPEDEF: guint16 gunichar2
 
 TYPEDEF: gpointer pointer
 
-REPLACE-C-TYPE: long\sdouble double
+STRUCT: fake-long-double { data char[10] } ;
+REPLACE-C-TYPE: long\sdouble fake-long-double
+
 REPLACE-C-TYPE: any gpointer
 
 IMPLEMENT-STRUCTS: GPollFD GSource GSourceFuncs ;
 
+CONSTANT: G_MININT8   HEX: -80
+CONSTANT: G_MAXINT8   HEX:  7f
+CONSTANT: G_MAXUINT8  HEX:  ff
+CONSTANT: G_MININT16  HEX: -8000
+CONSTANT: G_MAXINT16  HEX:  7fff
+CONSTANT: G_MAXUINT16 HEX:  ffff
+CONSTANT: G_MININT32  HEX: -80000000
+CONSTANT: G_MAXINT32  HEX:  7fffffff
+CONSTANT: G_MAXUINT32 HEX:  ffffffff
+CONSTANT: G_MININT64  HEX: -8000000000000000
+CONSTANT: G_MAXINT64  HEX:  7fffffffffffffff
+CONSTANT: G_MAXUINT64 HEX:  ffffffffffffffff
+
 GIR: vocab:glib/GLib-2.0.gir
 
 DESTRUCTOR: g_source_unref
index 7f0b161322d09a111093a9e7d29c2a95b3c93eb6..8c79e7a0b83d4a1dbd08baace89f884c2819ca95 100644 (file)
@@ -2,7 +2,7 @@
 ! See http://factorcode.org/license.txt for BSD license.
 USING: accessors ascii combinators fry
 gobject-introspection.common gobject-introspection.repository
-gobject-introspection.types kernel math.parser sequences
+gobject-introspection.types literals kernel math.parser sequences
 splitting xml.data xml.traversal ;
 FROM: namespaces => set get ;
 IN: gobject-introspection.loader
@@ -57,12 +57,24 @@ SYMBOL: namespace-PREFIX
         { "varargs" [ drop f f ] }
         { "callback" [ drop f "any" f type boa ] }
     } case ;
+
+CONSTANT: type-tags {
+    $[ "array" <null-name> ]
+    $[ "type" <null-name> ]
+    $[ "varargs" <null-name> ]
+    $[ "callback" <null-name> ]
+}
+
+: child-type-tag ( xml -- type-tag )
+    children-tags [
+        type-tags [ swap tag-named? ] with any?
+    ] find nip ;
     
 : load-parameter ( param xml -- param )
     [ "transfer-ownership" attr >>transfer-ownership ]
-    [ first-child-tag "type" attr >>c-type ]
+    [ child-type-tag "type" attr >>c-type ]
     [
-        first-child-tag xml>type
+        child-type-tag xml>type
         [ [ >>array-info ] [ >>type ] bi* ] [ 2drop f ] if*
     ] tri ;
 
@@ -146,7 +158,7 @@ SYMBOL: namespace-PREFIX
         [ "readable" attr "0" = not >>readable? ]
         [ "construct" attr "1" = >>construct? ]
         [ "construct-only" attr "1" = >>construct-only? ]
-        [ first-child-tag xml>type nip >>type ]
+        [ child-type-tag xml>type nip >>type ]
     } cleave ;
 
 : xml>callback ( xml -- callback )
@@ -223,12 +235,12 @@ SYMBOL: namespace-PREFIX
         [ "name" attr >>name ]
         [ "writable" attr "1" = >>writable? ]
         [
-            first-child-tag dup name>> main>> "callback" =
+            child-type-tag dup name>> main>> "callback" =
             [ drop "gpointer" ] [ "type" attr ] if
             >>c-type
         ]
         [
-            first-child-tag xml>type
+            child-type-tag xml>type
             [ [ >>array-info ] [ >>type ] bi* ] [ 2drop f ] if*
         ]
     } cleave ;
@@ -264,8 +276,8 @@ SYMBOL: namespace-PREFIX
             >>c-identifier
         ]
         [ "value" attr >>value ]
-        [ first-child-tag "type" attr >>c-type ]
-        [ first-child-tag xml>type nip >>type ]
+        [ child-type-tag "type" attr >>c-type ]
+        [ child-type-tag xml>type nip >>type ]
     } cleave ;
 
 : xml>namespace ( xml -- namespace )
diff --git a/basis/gobject-introspection/tests/g-i-marshalling-tests/GIMarshallingTests-1.0.gir b/basis/gobject-introspection/tests/g-i-marshalling-tests/GIMarshallingTests-1.0.gir
new file mode 100644 (file)
index 0000000..56d6277
--- /dev/null
@@ -0,0 +1,3600 @@
+<?xml version="1.0"?>
+<!-- This file was automatically generated from C sources - DO NOT EDIT!
+To affect the contents of this file, edit the original C definitions,
+and/or use gtk-doc annotations.  -->
+<repository version="1.1"
+            xmlns="http://www.gtk.org/introspection/core/1.0"
+            xmlns:c="http://www.gtk.org/introspection/c/1.0"
+            xmlns:glib="http://www.gtk.org/introspection/glib/1.0">
+  <include name="GLib" version="2.0"/>
+  <include name="GObject" version="2.0"/>
+  <package name="gobject-2.0"/>
+  <namespace name="GIMarshallingTests"
+             version="1.0"
+             shared-library="libgirepository-gimarshallingtests-1.0.so.1"
+             c:prefix="GIMarshallingTests">
+    <record name="BoxedStruct"
+            c:type="GIMarshallingTestsBoxedStruct"
+            glib:type-name="GIMarshallingTestsBoxedStruct"
+            glib:get-type="g_i_marshalling_tests_boxed_struct_get_type">
+      <field name="long_" writable="1">
+        <type name="long" c:type="glong"/>
+      </field>
+      <field name="g_strv" writable="1">
+        <array c:type="GStrv">
+          <type name="utf8"/>
+        </array>
+      </field>
+      <constructor name="new"
+                   c:identifier="g_i_marshalling_tests_boxed_struct_new">
+        <return-value transfer-ownership="full">
+          <type name="BoxedStruct" c:type="GIMarshallingTestsBoxedStruct*"/>
+        </return-value>
+      </constructor>
+    </record>
+    <constant name="CONSTANT_NUMBER" value="42">
+      <type name="int"/>
+    </constant>
+    <constant name="CONSTANT_UTF8" value="const xe2x99xa5 utf8">
+      <type name="utf8"/>
+    </constant>
+    <enumeration name="Enum" c:type="GIMarshallingTestsEnum">
+      <member name="value1"
+              value="0"
+              c:identifier="G_I_MARSHALLING_TESTS_ENUM_VALUE1"/>
+      <member name="value2"
+              value="1"
+              c:identifier="G_I_MARSHALLING_TESTS_ENUM_VALUE2"/>
+      <member name="value3"
+              value="42"
+              c:identifier="G_I_MARSHALLING_TESTS_ENUM_VALUE3"/>
+    </enumeration>
+    <bitfield name="Flags"
+              glib:type-name="GIMarshallingTestsFlags"
+              glib:get-type="g_i_marshalling_tests_flags_get_type"
+              c:type="GIMarshallingTestsFlags">
+      <member name="value1"
+              value="1"
+              c:identifier="G_I_MARSHALLING_TESTS_FLAGS_VALUE1"
+              glib:nick="value1"/>
+      <member name="value2"
+              value="2"
+              c:identifier="G_I_MARSHALLING_TESTS_FLAGS_VALUE2"
+              glib:nick="value2"/>
+      <member name="value3"
+              value="4"
+              c:identifier="G_I_MARSHALLING_TESTS_FLAGS_VALUE3"
+              glib:nick="value3"/>
+    </bitfield>
+    <enumeration name="GEnum"
+                 glib:type-name="GIMarshallingTestsGEnum"
+                 glib:get-type="g_i_marshalling_tests_genum_get_type"
+                 c:type="GIMarshallingTestsGEnum">
+      <member name="value1"
+              value="0"
+              c:identifier="G_I_MARSHALLING_TESTS_GENUM_VALUE1"
+              glib:nick="value1"/>
+      <member name="value2"
+              value="1"
+              c:identifier="G_I_MARSHALLING_TESTS_GENUM_VALUE2"
+              glib:nick="value2"/>
+      <member name="value3"
+              value="42"
+              c:identifier="G_I_MARSHALLING_TESTS_GENUM_VALUE3"
+              glib:nick="value3"/>
+    </enumeration>
+    <interface name="Interface"
+               c:type="GIMarshallingTestsInterface"
+               glib:type-name="GIMarshallingTestsInterface"
+               glib:get-type="g_i_marshalling_tests_interface_get_type"
+               glib:type-struct="InterfaceIface">
+      <virtual-method name="test_int8_in" invoker="test_int8_in">
+        <return-value transfer-ownership="none">
+          <type name="none" c:type="void"/>
+        </return-value>
+        <parameters>
+          <parameter name="in" transfer-ownership="none">
+            <type name="int8" c:type="gint8"/>
+          </parameter>
+        </parameters>
+      </virtual-method>
+      <method name="test_int8_in"
+              c:identifier="g_i_marshalling_tests_interface_test_int8_in">
+        <return-value transfer-ownership="none">
+          <type name="none" c:type="void"/>
+        </return-value>
+        <parameters>
+          <parameter name="in" transfer-ownership="none">
+            <type name="int8" c:type="gint8"/>
+          </parameter>
+        </parameters>
+      </method>
+    </interface>
+    <record name="InterfaceIface"
+            c:type="GIMarshallingTestsInterfaceIface"
+            glib:is-gtype-struct-for="Interface">
+      <field name="base_iface">
+        <type name="GObject.TypeInterface" c:type="GTypeInterface"/>
+      </field>
+      <field name="test_int8_in">
+        <callback name="test_int8_in" c:type="test_int8_in">
+          <return-value transfer-ownership="none">
+            <type name="none" c:type="void"/>
+          </return-value>
+          <parameters>
+            <parameter name="self" transfer-ownership="none">
+              <type name="Interface" c:type="GIMarshallingTestsInterface*"/>
+            </parameter>
+            <parameter name="in" transfer-ownership="none">
+              <type name="int8" c:type="gint8"/>
+            </parameter>
+          </parameters>
+        </callback>
+      </field>
+    </record>
+    <record name="NestedStruct" c:type="GIMarshallingTestsNestedStruct">
+      <field name="simple_struct" writable="1">
+        <type name="SimpleStruct" c:type="GIMarshallingTestsSimpleStruct"/>
+      </field>
+    </record>
+    <record name="NotSimpleStruct" c:type="GIMarshallingTestsNotSimpleStruct">
+      <field name="pointer" writable="1">
+        <type name="NestedStruct" c:type="GIMarshallingTestsNestedStruct*"/>
+      </field>
+    </record>
+    <constant name="OVERRIDES_CONSTANT" value="42">
+      <type name="int"/>
+    </constant>
+    <class name="Object"
+           c:type="GIMarshallingTestsObject"
+           parent="GObject.Object"
+           glib:type-name="GIMarshallingTestsObject"
+           glib:get-type="g_i_marshalling_tests_object_get_type"
+           glib:type-struct="ObjectClass">
+      <constructor name="new" c:identifier="g_i_marshalling_tests_object_new">
+        <return-value transfer-ownership="full">
+          <type name="Object" c:type="GIMarshallingTestsObject*"/>
+        </return-value>
+        <parameters>
+          <parameter name="int_" transfer-ownership="none">
+            <type name="int" c:type="gint"/>
+          </parameter>
+        </parameters>
+      </constructor>
+      <function name="static_method"
+                c:identifier="g_i_marshalling_tests_object_static_method">
+        <return-value transfer-ownership="none">
+          <type name="none" c:type="void"/>
+        </return-value>
+      </function>
+      <virtual-method name="method_int8_in" invoker="method_int8_in">
+        <return-value transfer-ownership="none">
+          <type name="none" c:type="void"/>
+        </return-value>
+        <parameters>
+          <parameter name="in" transfer-ownership="none">
+            <type name="int8" c:type="gint8"/>
+          </parameter>
+        </parameters>
+      </virtual-method>
+      <virtual-method name="method_int8_out" invoker="method_int8_out">
+        <return-value transfer-ownership="none">
+          <type name="none" c:type="void"/>
+        </return-value>
+        <parameters>
+          <parameter name="out"
+                     direction="out"
+                     caller-allocates="0"
+                     transfer-ownership="full">
+            <type name="int8" c:type="gint8*"/>
+          </parameter>
+        </parameters>
+      </virtual-method>
+      <virtual-method name="method_with_default_implementation"
+                      invoker="method_with_default_implementation">
+        <return-value transfer-ownership="none">
+          <type name="none" c:type="void"/>
+        </return-value>
+        <parameters>
+          <parameter name="in" transfer-ownership="none">
+            <type name="int8" c:type="gint8"/>
+          </parameter>
+        </parameters>
+      </virtual-method>
+      <method name="method" c:identifier="g_i_marshalling_tests_object_method">
+        <return-value transfer-ownership="none">
+          <type name="none" c:type="void"/>
+        </return-value>
+      </method>
+      <method name="overridden_method"
+              c:identifier="g_i_marshalling_tests_object_overridden_method">
+        <return-value transfer-ownership="none">
+          <type name="none" c:type="void"/>
+        </return-value>
+      </method>
+      <method name="method_array_in"
+              c:identifier="g_i_marshalling_tests_object_method_array_in">
+        <return-value transfer-ownership="none">
+          <type name="none" c:type="void"/>
+        </return-value>
+        <parameters>
+          <parameter name="ints" transfer-ownership="none">
+            <array length="2" c:type="gint*">
+              <type name="int"/>
+            </array>
+          </parameter>
+          <parameter name="length" transfer-ownership="none">
+            <type name="int" c:type="gint"/>
+          </parameter>
+        </parameters>
+      </method>
+      <method name="method_array_out"
+              c:identifier="g_i_marshalling_tests_object_method_array_out">
+        <return-value transfer-ownership="none">
+          <type name="none" c:type="void"/>
+        </return-value>
+        <parameters>
+          <parameter name="ints"
+                     direction="out"
+                     caller-allocates="0"
+                     transfer-ownership="none">
+            <array length="2" c:type="gint**">
+              <type name="int"/>
+            </array>
+          </parameter>
+          <parameter name="length"
+                     direction="out"
+                     caller-allocates="0"
+                     transfer-ownership="full">
+            <type name="int" c:type="gint*"/>
+          </parameter>
+        </parameters>
+      </method>
+      <method name="method_array_inout"
+              c:identifier="g_i_marshalling_tests_object_method_array_inout">
+        <return-value transfer-ownership="none">
+          <type name="none" c:type="void"/>
+        </return-value>
+        <parameters>
+          <parameter name="ints"
+                     direction="inout"
+                     caller-allocates="0"
+                     transfer-ownership="none">
+            <array length="2" c:type="gint**">
+              <type name="int"/>
+            </array>
+          </parameter>
+          <parameter name="length"
+                     direction="inout"
+                     caller-allocates="0"
+                     transfer-ownership="full">
+            <type name="int" c:type="gint*"/>
+          </parameter>
+        </parameters>
+      </method>
+      <method name="method_array_return"
+              c:identifier="g_i_marshalling_tests_object_method_array_return">
+        <return-value transfer-ownership="none">
+          <array length="1" c:type="gint*">
+            <type name="int"/>
+          </array>
+        </return-value>
+        <parameters>
+          <parameter name="length"
+                     direction="out"
+                     caller-allocates="0"
+                     transfer-ownership="full">
+            <type name="int" c:type="gint*"/>
+          </parameter>
+        </parameters>
+      </method>
+      <method name="method_int8_in"
+              c:identifier="g_i_marshalling_tests_object_method_int8_in">
+        <return-value transfer-ownership="none">
+          <type name="none" c:type="void"/>
+        </return-value>
+        <parameters>
+          <parameter name="in" transfer-ownership="none">
+            <type name="int8" c:type="gint8"/>
+          </parameter>
+        </parameters>
+      </method>
+      <method name="method_int8_out"
+              c:identifier="g_i_marshalling_tests_object_method_int8_out">
+        <return-value transfer-ownership="none">
+          <type name="none" c:type="void"/>
+        </return-value>
+        <parameters>
+          <parameter name="out"
+                     direction="out"
+                     caller-allocates="0"
+                     transfer-ownership="full">
+            <type name="int8" c:type="gint8*"/>
+          </parameter>
+        </parameters>
+      </method>
+      <method name="method_with_default_implementation"
+              c:identifier="g_i_marshalling_tests_object_method_with_default_implementation">
+        <return-value transfer-ownership="none">
+          <type name="none" c:type="void"/>
+        </return-value>
+        <parameters>
+          <parameter name="in" transfer-ownership="none">
+            <type name="int8" c:type="gint8"/>
+          </parameter>
+        </parameters>
+      </method>
+      <property name="int"
+                writable="1"
+                construct="1"
+                transfer-ownership="none">
+        <type name="int" c:type="gint"/>
+      </property>
+      <field name="parent_instance">
+        <type name="GObject.Object" c:type="GObject"/>
+      </field>
+      <field name="int_">
+        <type name="int" c:type="gint"/>
+      </field>
+    </class>
+    <record name="ObjectClass"
+            c:type="GIMarshallingTestsObjectClass"
+            glib:is-gtype-struct-for="Object">
+      <field name="parent_class">
+        <type name="GObject.ObjectClass" c:type="GObjectClass"/>
+      </field>
+      <field name="method_int8_in">
+        <callback name="method_int8_in" c:type="method_int8_in">
+          <return-value transfer-ownership="none">
+            <type name="none" c:type="void"/>
+          </return-value>
+          <parameters>
+            <parameter name="self" transfer-ownership="none">
+              <type name="Object" c:type="GIMarshallingTestsObject*"/>
+            </parameter>
+            <parameter name="in" transfer-ownership="none">
+              <type name="int8" c:type="gint8"/>
+            </parameter>
+          </parameters>
+        </callback>
+      </field>
+      <field name="method_int8_out">
+        <callback name="method_int8_out" c:type="method_int8_out">
+          <return-value transfer-ownership="none">
+            <type name="none" c:type="void"/>
+          </return-value>
+          <parameters>
+            <parameter name="self" transfer-ownership="none">
+              <type name="Object" c:type="GIMarshallingTestsObject*"/>
+            </parameter>
+            <parameter name="out"
+                       direction="out"
+                       caller-allocates="0"
+                       transfer-ownership="full">
+              <type name="int8" c:type="gint8*"/>
+            </parameter>
+          </parameters>
+        </callback>
+      </field>
+      <field name="method_with_default_implementation">
+        <callback name="method_with_default_implementation"
+                  c:type="method_with_default_implementation">
+          <return-value transfer-ownership="none">
+            <type name="none" c:type="void"/>
+          </return-value>
+          <parameters>
+            <parameter name="self" transfer-ownership="none">
+              <type name="Object" c:type="GIMarshallingTestsObject*"/>
+            </parameter>
+            <parameter name="in" transfer-ownership="none">
+              <type name="int8" c:type="gint8"/>
+            </parameter>
+          </parameters>
+        </callback>
+      </field>
+    </record>
+    <class name="OverridesObject"
+           c:type="GIMarshallingTestsOverridesObject"
+           parent="GObject.Object"
+           glib:type-name="GIMarshallingTestsOverridesObject"
+           glib:get-type="g_i_marshalling_tests_overrides_object_get_type"
+           glib:type-struct="OverridesObjectClass">
+      <constructor name="new"
+                   c:identifier="g_i_marshalling_tests_overrides_object_new">
+        <return-value transfer-ownership="full">
+          <type name="OverridesObject"
+                c:type="GIMarshallingTestsOverridesObject*"/>
+        </return-value>
+      </constructor>
+      <method name="method"
+              c:identifier="g_i_marshalling_tests_overrides_object_method">
+        <return-value transfer-ownership="none">
+          <type name="long" c:type="glong"/>
+        </return-value>
+      </method>
+      <field name="parent_instance">
+        <type name="GObject.Object" c:type="GObject"/>
+      </field>
+      <field name="long_">
+        <type name="long" c:type="glong"/>
+      </field>
+    </class>
+    <record name="OverridesObjectClass"
+            c:type="GIMarshallingTestsOverridesObjectClass"
+            glib:is-gtype-struct-for="OverridesObject">
+      <field name="parent_class">
+        <type name="GObject.ObjectClass" c:type="GObjectClass"/>
+      </field>
+    </record>
+    <record name="OverridesStruct"
+            c:type="GIMarshallingTestsOverridesStruct"
+            glib:type-name="GIMarshallingTestsOverridesStruct"
+            glib:get-type="g_i_marshalling_tests_overrides_struct_get_type">
+      <field name="long_" writable="1">
+        <type name="long" c:type="glong"/>
+      </field>
+      <constructor name="new"
+                   c:identifier="g_i_marshalling_tests_overrides_struct_new">
+        <return-value transfer-ownership="full">
+          <type name="OverridesStruct"
+                c:type="GIMarshallingTestsOverridesStruct*"/>
+        </return-value>
+      </constructor>
+      <method name="method"
+              c:identifier="g_i_marshalling_tests_overrides_struct_method">
+        <return-value transfer-ownership="none">
+          <type name="long" c:type="glong"/>
+        </return-value>
+      </method>
+    </record>
+    <record name="PointerStruct" c:type="GIMarshallingTestsPointerStruct">
+      <field name="long_" writable="1">
+        <type name="long" c:type="glong"/>
+      </field>
+    </record>
+    <record name="SimpleStruct" c:type="GIMarshallingTestsSimpleStruct">
+      <field name="long_" writable="1">
+        <type name="long" c:type="glong"/>
+      </field>
+      <field name="int8" writable="1">
+        <type name="int8" c:type="gint8"/>
+      </field>
+      <method name="method"
+              c:identifier="g_i_marshalling_tests_simple_struct_method">
+        <return-value transfer-ownership="none">
+          <type name="none" c:type="void"/>
+        </return-value>
+      </method>
+    </record>
+    <class name="SubObject"
+           c:type="GIMarshallingTestsSubObject"
+           parent="Object"
+           glib:type-name="GIMarshallingTestsSubObject"
+           glib:get-type="g_i_marshalling_tests_sub_object_get_type"
+           glib:type-struct="SubObjectClass">
+      <method name="sub_method"
+              c:identifier="g_i_marshalling_tests_sub_object_sub_method">
+        <return-value transfer-ownership="none">
+          <type name="none" c:type="void"/>
+        </return-value>
+      </method>
+      <method name="overwritten_method"
+              c:identifier="g_i_marshalling_tests_sub_object_overwritten_method">
+        <return-value transfer-ownership="none">
+          <type name="none" c:type="void"/>
+        </return-value>
+      </method>
+      <field name="parent_instance">
+        <type name="Object" c:type="GIMarshallingTestsObject"/>
+      </field>
+    </class>
+    <record name="SubObjectClass"
+            c:type="GIMarshallingTestsSubObjectClass"
+            glib:is-gtype-struct-for="SubObject">
+      <field name="parent_class">
+        <type name="ObjectClass" c:type="GIMarshallingTestsObjectClass"/>
+      </field>
+    </record>
+    <union name="Union"
+           c:type="GIMarshallingTestsUnion"
+           glib:type-name="GIMarshallingTestsUnion"
+           glib:get-type="g_i_marshalling_tests_union_get_type">
+      <field name="long_" writable="1">
+        <type name="long" c:type="glong"/>
+      </field>
+      <method name="method" c:identifier="g_i_marshalling_tests_union_method">
+        <return-value transfer-ownership="none">
+          <type name="none" c:type="void"/>
+        </return-value>
+      </method>
+    </union>
+    <function name="array_fixed_inout"
+              c:identifier="g_i_marshalling_tests_array_fixed_inout">
+      <return-value transfer-ownership="none">
+        <type name="none" c:type="void"/>
+      </return-value>
+      <parameters>
+        <parameter name="ints"
+                   direction="inout"
+                   caller-allocates="0"
+                   transfer-ownership="none">
+          <array c:type="gint**" fixed-size="4">
+            <type name="int"/>
+          </array>
+        </parameter>
+      </parameters>
+    </function>
+    <function name="array_fixed_int_in"
+              c:identifier="g_i_marshalling_tests_array_fixed_int_in">
+      <return-value transfer-ownership="none">
+        <type name="none" c:type="void"/>
+      </return-value>
+      <parameters>
+        <parameter name="ints" transfer-ownership="none">
+          <array c:type="gint*" fixed-size="4">
+            <type name="int"/>
+          </array>
+        </parameter>
+      </parameters>
+    </function>
+    <function name="array_fixed_int_return"
+              c:identifier="g_i_marshalling_tests_array_fixed_int_return">
+      <return-value transfer-ownership="none">
+        <array c:type="gint*" fixed-size="4">
+          <type name="int"/>
+        </array>
+      </return-value>
+    </function>
+    <function name="array_fixed_out"
+              c:identifier="g_i_marshalling_tests_array_fixed_out">
+      <return-value transfer-ownership="none">
+        <type name="none" c:type="void"/>
+      </return-value>
+      <parameters>
+        <parameter name="ints"
+                   direction="out"
+                   caller-allocates="0"
+                   transfer-ownership="none">
+          <array c:type="gint**" fixed-size="4">
+            <type name="int"/>
+          </array>
+        </parameter>
+      </parameters>
+    </function>
+    <function name="array_fixed_out_struct"
+              c:identifier="g_i_marshalling_tests_array_fixed_out_struct">
+      <return-value transfer-ownership="none">
+        <type name="none" c:type="void"/>
+      </return-value>
+      <parameters>
+        <parameter name="structs"
+                   direction="out"
+                   caller-allocates="0"
+                   transfer-ownership="none">
+          <array c:type="GIMarshallingTestsSimpleStruct**" fixed-size="2">
+            <type name="SimpleStruct"/>
+          </array>
+        </parameter>
+      </parameters>
+    </function>
+    <function name="array_fixed_short_in"
+              c:identifier="g_i_marshalling_tests_array_fixed_short_in">
+      <return-value transfer-ownership="none">
+        <type name="none" c:type="void"/>
+      </return-value>
+      <parameters>
+        <parameter name="shorts" transfer-ownership="none">
+          <array c:type="gshort*" fixed-size="4">
+            <type name="short"/>
+          </array>
+        </parameter>
+      </parameters>
+    </function>
+    <function name="array_fixed_short_return"
+              c:identifier="g_i_marshalling_tests_array_fixed_short_return">
+      <return-value transfer-ownership="none">
+        <array c:type="gshort*" fixed-size="4">
+          <type name="short"/>
+        </array>
+      </return-value>
+    </function>
+    <function name="array_in" c:identifier="g_i_marshalling_tests_array_in">
+      <return-value transfer-ownership="none">
+        <type name="none" c:type="void"/>
+      </return-value>
+      <parameters>
+        <parameter name="ints" transfer-ownership="none">
+          <array length="1" c:type="gint*">
+            <type name="int"/>
+          </array>
+        </parameter>
+        <parameter name="length" transfer-ownership="none">
+          <type name="int" c:type="gint"/>
+        </parameter>
+      </parameters>
+    </function>
+    <function name="array_inout"
+              c:identifier="g_i_marshalling_tests_array_inout">
+      <return-value transfer-ownership="none">
+        <type name="none" c:type="void"/>
+      </return-value>
+      <parameters>
+        <parameter name="ints"
+                   direction="inout"
+                   caller-allocates="0"
+                   transfer-ownership="none">
+          <array length="1" c:type="gint**">
+            <type name="int"/>
+          </array>
+        </parameter>
+        <parameter name="length"
+                   direction="inout"
+                   caller-allocates="0"
+                   transfer-ownership="full">
+          <type name="int" c:type="gint*"/>
+        </parameter>
+      </parameters>
+    </function>
+    <function name="array_out" c:identifier="g_i_marshalling_tests_array_out">
+      <return-value transfer-ownership="none">
+        <type name="none" c:type="void"/>
+      </return-value>
+      <parameters>
+        <parameter name="ints"
+                   direction="out"
+                   caller-allocates="0"
+                   transfer-ownership="none">
+          <array length="1" c:type="gint**">
+            <type name="int"/>
+          </array>
+        </parameter>
+        <parameter name="length"
+                   direction="out"
+                   caller-allocates="0"
+                   transfer-ownership="full">
+          <type name="int" c:type="gint*"/>
+        </parameter>
+      </parameters>
+    </function>
+    <function name="array_return"
+              c:identifier="g_i_marshalling_tests_array_return">
+      <return-value transfer-ownership="none">
+        <array length="0" c:type="gint*">
+          <type name="int"/>
+        </array>
+      </return-value>
+      <parameters>
+        <parameter name="length"
+                   direction="out"
+                   caller-allocates="0"
+                   transfer-ownership="full">
+          <type name="int" c:type="gint*"/>
+        </parameter>
+      </parameters>
+    </function>
+    <function name="array_zero_terminated_in"
+              c:identifier="g_i_marshalling_tests_array_zero_terminated_in">
+      <return-value transfer-ownership="none">
+        <type name="none" c:type="void"/>
+      </return-value>
+      <parameters>
+        <parameter name="utf8s" transfer-ownership="none">
+          <array c:type="gchar**">
+            <type name="utf8"/>
+          </array>
+        </parameter>
+      </parameters>
+    </function>
+    <function name="array_zero_terminated_inout"
+              c:identifier="g_i_marshalling_tests_array_zero_terminated_inout">
+      <return-value transfer-ownership="none">
+        <type name="none" c:type="void"/>
+      </return-value>
+      <parameters>
+        <parameter name="utf8s"
+                   direction="inout"
+                   caller-allocates="0"
+                   transfer-ownership="none">
+          <array c:type="gchar***">
+            <type name="utf8"/>
+          </array>
+        </parameter>
+      </parameters>
+    </function>
+    <function name="array_zero_terminated_out"
+              c:identifier="g_i_marshalling_tests_array_zero_terminated_out">
+      <return-value transfer-ownership="none">
+        <type name="none" c:type="void"/>
+      </return-value>
+      <parameters>
+        <parameter name="utf8s"
+                   direction="out"
+                   caller-allocates="0"
+                   transfer-ownership="none">
+          <array c:type="gchar***">
+            <type name="utf8"/>
+          </array>
+        </parameter>
+      </parameters>
+    </function>
+    <function name="array_zero_terminated_return"
+              c:identifier="g_i_marshalling_tests_array_zero_terminated_return">
+      <return-value transfer-ownership="none">
+        <array c:type="gchar**">
+          <type name="utf8"/>
+        </array>
+      </return-value>
+    </function>
+    <function name="boolean_in_false"
+              c:identifier="g_i_marshalling_tests_boolean_in_false">
+      <return-value transfer-ownership="none">
+        <type name="none" c:type="void"/>
+      </return-value>
+      <parameters>
+        <parameter name="bool_" transfer-ownership="none">
+          <type name="boolean" c:type="gboolean"/>
+        </parameter>
+      </parameters>
+    </function>
+    <function name="boolean_in_true"
+              c:identifier="g_i_marshalling_tests_boolean_in_true">
+      <return-value transfer-ownership="none">
+        <type name="none" c:type="void"/>
+      </return-value>
+      <parameters>
+        <parameter name="bool_" transfer-ownership="none">
+          <type name="boolean" c:type="gboolean"/>
+        </parameter>
+      </parameters>
+    </function>
+    <function name="boolean_inout_false_true"
+              c:identifier="g_i_marshalling_tests_boolean_inout_false_true">
+      <return-value transfer-ownership="none">
+        <type name="none" c:type="void"/>
+      </return-value>
+      <parameters>
+        <parameter name="bool_"
+                   direction="inout"
+                   caller-allocates="0"
+                   transfer-ownership="full">
+          <type name="boolean" c:type="gboolean*"/>
+        </parameter>
+      </parameters>
+    </function>
+    <function name="boolean_inout_true_false"
+              c:identifier="g_i_marshalling_tests_boolean_inout_true_false">
+      <return-value transfer-ownership="none">
+        <type name="none" c:type="void"/>
+      </return-value>
+      <parameters>
+        <parameter name="bool_"
+                   direction="inout"
+                   caller-allocates="0"
+                   transfer-ownership="full">
+          <type name="boolean" c:type="gboolean*"/>
+        </parameter>
+      </parameters>
+    </function>
+    <function name="boolean_out_false"
+              c:identifier="g_i_marshalling_tests_boolean_out_false">
+      <return-value transfer-ownership="none">
+        <type name="none" c:type="void"/>
+      </return-value>
+      <parameters>
+        <parameter name="bool_"
+                   direction="out"
+                   caller-allocates="0"
+                   transfer-ownership="full">
+          <type name="boolean" c:type="gboolean*"/>
+        </parameter>
+      </parameters>
+    </function>
+    <function name="boolean_out_true"
+              c:identifier="g_i_marshalling_tests_boolean_out_true">
+      <return-value transfer-ownership="none">
+        <type name="none" c:type="void"/>
+      </return-value>
+      <parameters>
+        <parameter name="bool_"
+                   direction="out"
+                   caller-allocates="0"
+                   transfer-ownership="full">
+          <type name="boolean" c:type="gboolean*"/>
+        </parameter>
+      </parameters>
+    </function>
+    <function name="boolean_return_false"
+              c:identifier="g_i_marshalling_tests_boolean_return_false">
+      <return-value transfer-ownership="none">
+        <type name="boolean" c:type="gboolean"/>
+      </return-value>
+    </function>
+    <function name="boolean_return_true"
+              c:identifier="g_i_marshalling_tests_boolean_return_true">
+      <return-value transfer-ownership="none">
+        <type name="boolean" c:type="gboolean"/>
+      </return-value>
+    </function>
+    <function name="boxed_struct_in"
+              c:identifier="g_i_marshalling_tests__boxed_struct_in">
+      <return-value transfer-ownership="none">
+        <type name="none" c:type="void"/>
+      </return-value>
+      <parameters>
+        <parameter name="struct_" transfer-ownership="none">
+          <type name="BoxedStruct" c:type="GIMarshallingTestsBoxedStruct*"/>
+        </parameter>
+      </parameters>
+    </function>
+    <function name="boxed_struct_inout"
+              c:identifier="g_i_marshalling_tests__boxed_struct_inout">
+      <return-value transfer-ownership="none">
+        <type name="none" c:type="void"/>
+      </return-value>
+      <parameters>
+        <parameter name="struct_"
+                   direction="inout"
+                   caller-allocates="0"
+                   transfer-ownership="none">
+          <type name="BoxedStruct" c:type="GIMarshallingTestsBoxedStruct**"/>
+        </parameter>
+      </parameters>
+    </function>
+    <function name="boxed_struct_out"
+              c:identifier="g_i_marshalling_tests__boxed_struct_out">
+      <return-value transfer-ownership="none">
+        <type name="none" c:type="void"/>
+      </return-value>
+      <parameters>
+        <parameter name="struct_"
+                   direction="out"
+                   caller-allocates="0"
+                   transfer-ownership="none">
+          <type name="BoxedStruct" c:type="GIMarshallingTestsBoxedStruct**"/>
+        </parameter>
+      </parameters>
+    </function>
+    <function name="boxed_struct_return"
+              c:identifier="g_i_marshalling_tests__boxed_struct_return">
+      <return-value transfer-ownership="none">
+        <type name="BoxedStruct" c:type="GIMarshallingTestsBoxedStruct*"/>
+      </return-value>
+    </function>
+    <function name="bytearray_full_return"
+              c:identifier="g_i_marshalling_tests_bytearray_full_return">
+      <return-value transfer-ownership="full">
+        <array name="GLib.ByteArray" c:type="GByteArray*">
+          <type name="any" c:type="gpointer"/>
+        </array>
+      </return-value>
+    </function>
+    <function name="bytearray_none_in"
+              c:identifier="g_i_marshalling_tests_bytearray_none_in">
+      <return-value transfer-ownership="none">
+        <type name="none" c:type="void"/>
+      </return-value>
+      <parameters>
+        <parameter name="array_" transfer-ownership="none">
+          <array name="GLib.ByteArray" c:type="GByteArray*">
+            <type name="int"/>
+          </array>
+        </parameter>
+      </parameters>
+    </function>
+    <function name="double_in" c:identifier="g_i_marshalling_tests_double_in">
+      <return-value transfer-ownership="none">
+        <type name="none" c:type="void"/>
+      </return-value>
+      <parameters>
+        <parameter name="double_" transfer-ownership="none">
+          <type name="double" c:type="gdouble"/>
+        </parameter>
+      </parameters>
+    </function>
+    <function name="double_inout"
+              c:identifier="g_i_marshalling_tests_double_inout">
+      <return-value transfer-ownership="none">
+        <type name="none" c:type="void"/>
+      </return-value>
+      <parameters>
+        <parameter name="double_"
+                   direction="inout"
+                   caller-allocates="0"
+                   transfer-ownership="full">
+          <type name="double" c:type="gdouble*"/>
+        </parameter>
+      </parameters>
+    </function>
+    <function name="double_out"
+              c:identifier="g_i_marshalling_tests_double_out">
+      <return-value transfer-ownership="none">
+        <type name="none" c:type="void"/>
+      </return-value>
+      <parameters>
+        <parameter name="double_"
+                   direction="out"
+                   caller-allocates="0"
+                   transfer-ownership="full">
+          <type name="double" c:type="gdouble*"/>
+        </parameter>
+      </parameters>
+    </function>
+    <function name="double_return"
+              c:identifier="g_i_marshalling_tests_double_return">
+      <return-value transfer-ownership="none">
+        <type name="double" c:type="gdouble"/>
+      </return-value>
+    </function>
+    <function name="enum_in" c:identifier="g_i_marshalling_tests_enum_in">
+      <return-value transfer-ownership="none">
+        <type name="none" c:type="void"/>
+      </return-value>
+      <parameters>
+        <parameter name="enum_" transfer-ownership="none">
+          <type name="Enum" c:type="GIMarshallingTestsEnum"/>
+        </parameter>
+      </parameters>
+    </function>
+    <function name="enum_inout"
+              c:identifier="g_i_marshalling_tests_enum_inout">
+      <return-value transfer-ownership="none">
+        <type name="none" c:type="void"/>
+      </return-value>
+      <parameters>
+        <parameter name="enum_"
+                   direction="inout"
+                   caller-allocates="0"
+                   transfer-ownership="full">
+          <type name="Enum" c:type="GIMarshallingTestsEnum*"/>
+        </parameter>
+      </parameters>
+    </function>
+    <function name="enum_out" c:identifier="g_i_marshalling_tests_enum_out">
+      <return-value transfer-ownership="none">
+        <type name="none" c:type="void"/>
+      </return-value>
+      <parameters>
+        <parameter name="enum_"
+                   direction="out"
+                   caller-allocates="1"
+                   transfer-ownership="none">
+          <type name="Enum" c:type="GIMarshallingTestsEnum*"/>
+        </parameter>
+      </parameters>
+    </function>
+    <function name="enum_return"
+              c:identifier="g_i_marshalling_tests_enum_return">
+      <return-value transfer-ownership="full">
+        <type name="Enum" c:type="GIMarshallingTestsEnum"/>
+      </return-value>
+    </function>
+    <function name="filename_list_return"
+              c:identifier="g_i_marshalling_tests_filename_list_return"
+              introspectable="0">
+      <return-value transfer-ownership="full">
+        <type name="GLib.SList" c:type="GSList*">
+          <type name="any" c:type="gpointer"/>
+        </type>
+      </return-value>
+    </function>
+    <function name="flags_in" c:identifier="g_i_marshalling_tests_flags_in">
+      <return-value transfer-ownership="none">
+        <type name="none" c:type="void"/>
+      </return-value>
+      <parameters>
+        <parameter name="flags_" transfer-ownership="none">
+          <type name="Flags" c:type="GIMarshallingTestsFlags"/>
+        </parameter>
+      </parameters>
+    </function>
+    <function name="flags_in_zero"
+              c:identifier="g_i_marshalling_tests_flags_in_zero">
+      <return-value transfer-ownership="none">
+        <type name="none" c:type="void"/>
+      </return-value>
+      <parameters>
+        <parameter name="flags" transfer-ownership="none">
+          <type name="Flags" c:type="GIMarshallingTestsFlags"/>
+        </parameter>
+      </parameters>
+    </function>
+    <function name="flags_inout"
+              c:identifier="g_i_marshalling_tests_flags_inout">
+      <return-value transfer-ownership="none">
+        <type name="none" c:type="void"/>
+      </return-value>
+      <parameters>
+        <parameter name="flags_"
+                   direction="inout"
+                   caller-allocates="0"
+                   transfer-ownership="full">
+          <type name="Flags" c:type="GIMarshallingTestsFlags*"/>
+        </parameter>
+      </parameters>
+    </function>
+    <function name="flags_out" c:identifier="g_i_marshalling_tests_flags_out">
+      <return-value transfer-ownership="none">
+        <type name="none" c:type="void"/>
+      </return-value>
+      <parameters>
+        <parameter name="flags_"
+                   direction="out"
+                   caller-allocates="1"
+                   transfer-ownership="none">
+          <type name="Flags" c:type="GIMarshallingTestsFlags*"/>
+        </parameter>
+      </parameters>
+    </function>
+    <function name="flags_return"
+              c:identifier="g_i_marshalling_tests_flags_return">
+      <return-value transfer-ownership="full">
+        <type name="Flags" c:type="GIMarshallingTestsFlags"/>
+      </return-value>
+    </function>
+    <function name="float_in" c:identifier="g_i_marshalling_tests_float_in">
+      <return-value transfer-ownership="none">
+        <type name="none" c:type="void"/>
+      </return-value>
+      <parameters>
+        <parameter name="float_" transfer-ownership="none">
+          <type name="float" c:type="gfloat"/>
+        </parameter>
+      </parameters>
+    </function>
+    <function name="float_inout"
+              c:identifier="g_i_marshalling_tests_float_inout">
+      <return-value transfer-ownership="none">
+        <type name="none" c:type="void"/>
+      </return-value>
+      <parameters>
+        <parameter name="float_"
+                   direction="inout"
+                   caller-allocates="0"
+                   transfer-ownership="full">
+          <type name="float" c:type="gfloat*"/>
+        </parameter>
+      </parameters>
+    </function>
+    <function name="float_out" c:identifier="g_i_marshalling_tests_float_out">
+      <return-value transfer-ownership="none">
+        <type name="none" c:type="void"/>
+      </return-value>
+      <parameters>
+        <parameter name="float_"
+                   direction="out"
+                   caller-allocates="0"
+                   transfer-ownership="full">
+          <type name="float" c:type="gfloat*"/>
+        </parameter>
+      </parameters>
+    </function>
+    <function name="float_return"
+              c:identifier="g_i_marshalling_tests_float_return">
+      <return-value transfer-ownership="none">
+        <type name="float" c:type="gfloat"/>
+      </return-value>
+    </function>
+    <function name="garray_int_none_in"
+              c:identifier="g_i_marshalling_tests_garray_int_none_in">
+      <return-value transfer-ownership="none">
+        <type name="none" c:type="void"/>
+      </return-value>
+      <parameters>
+        <parameter name="array_" transfer-ownership="none">
+          <array name="GLib.Array" c:type="GArray*">
+            <type name="int"/>
+          </array>
+        </parameter>
+      </parameters>
+    </function>
+    <function name="garray_int_none_return"
+              c:identifier="g_i_marshalling_tests_garray_int_none_return">
+      <return-value transfer-ownership="none">
+        <array name="GLib.Array" c:type="GArray*">
+          <type name="int"/>
+        </array>
+      </return-value>
+    </function>
+    <function name="garray_utf8_container_in"
+              c:identifier="g_i_marshalling_tests_garray_utf8_container_in">
+      <return-value transfer-ownership="none">
+        <type name="none" c:type="void"/>
+      </return-value>
+      <parameters>
+        <parameter name="array_" transfer-ownership="container">
+          <array name="GLib.Array" c:type="GArray*">
+            <type name="utf8"/>
+          </array>
+        </parameter>
+      </parameters>
+    </function>
+    <function name="garray_utf8_container_inout"
+              c:identifier="g_i_marshalling_tests_garray_utf8_container_inout">
+      <return-value transfer-ownership="none">
+        <type name="none" c:type="void"/>
+      </return-value>
+      <parameters>
+        <parameter name="array_"
+                   direction="inout"
+                   caller-allocates="0"
+                   transfer-ownership="container">
+          <array name="GLib.Array" c:type="GArray**">
+            <type name="utf8"/>
+          </array>
+        </parameter>
+      </parameters>
+    </function>
+    <function name="garray_utf8_container_out"
+              c:identifier="g_i_marshalling_tests_garray_utf8_container_out">
+      <return-value transfer-ownership="none">
+        <type name="none" c:type="void"/>
+      </return-value>
+      <parameters>
+        <parameter name="array_"
+                   direction="out"
+                   caller-allocates="0"
+                   transfer-ownership="container">
+          <array name="GLib.Array" c:type="GArray**">
+            <type name="utf8"/>
+          </array>
+        </parameter>
+      </parameters>
+    </function>
+    <function name="garray_utf8_container_return"
+              c:identifier="g_i_marshalling_tests_garray_utf8_container_return">
+      <return-value transfer-ownership="container">
+        <array name="GLib.Array" c:type="GArray*">
+          <type name="utf8"/>
+        </array>
+      </return-value>
+    </function>
+    <function name="garray_utf8_full_in"
+              c:identifier="g_i_marshalling_tests_garray_utf8_full_in">
+      <return-value transfer-ownership="none">
+        <type name="none" c:type="void"/>
+      </return-value>
+      <parameters>
+        <parameter name="array_" transfer-ownership="full">
+          <array name="GLib.Array" c:type="GArray*">
+            <type name="utf8"/>
+          </array>
+        </parameter>
+      </parameters>
+    </function>
+    <function name="garray_utf8_full_inout"
+              c:identifier="g_i_marshalling_tests_garray_utf8_full_inout">
+      <return-value transfer-ownership="none">
+        <type name="none" c:type="void"/>
+      </return-value>
+      <parameters>
+        <parameter name="array_"
+                   direction="inout"
+                   caller-allocates="0"
+                   transfer-ownership="full">
+          <array name="GLib.Array" c:type="GArray**">
+            <type name="utf8"/>
+          </array>
+        </parameter>
+      </parameters>
+    </function>
+    <function name="garray_utf8_full_out"
+              c:identifier="g_i_marshalling_tests_garray_utf8_full_out">
+      <return-value transfer-ownership="none">
+        <type name="none" c:type="void"/>
+      </return-value>
+      <parameters>
+        <parameter name="array_"
+                   direction="out"
+                   caller-allocates="0"
+                   transfer-ownership="full">
+          <array name="GLib.Array" c:type="GArray**">
+            <type name="utf8"/>
+          </array>
+        </parameter>
+      </parameters>
+    </function>
+    <function name="garray_utf8_full_return"
+              c:identifier="g_i_marshalling_tests_garray_utf8_full_return">
+      <return-value transfer-ownership="full">
+        <array name="GLib.Array" c:type="GArray*">
+          <type name="utf8"/>
+        </array>
+      </return-value>
+    </function>
+    <function name="garray_utf8_none_in"
+              c:identifier="g_i_marshalling_tests_garray_utf8_none_in">
+      <return-value transfer-ownership="none">
+        <type name="none" c:type="void"/>
+      </return-value>
+      <parameters>
+        <parameter name="array_" transfer-ownership="none">
+          <array name="GLib.Array" c:type="GArray*">
+            <type name="utf8"/>
+          </array>
+        </parameter>
+      </parameters>
+    </function>
+    <function name="garray_utf8_none_inout"
+              c:identifier="g_i_marshalling_tests_garray_utf8_none_inout">
+      <return-value transfer-ownership="none">
+        <type name="none" c:type="void"/>
+      </return-value>
+      <parameters>
+        <parameter name="array_"
+                   direction="inout"
+                   caller-allocates="0"
+                   transfer-ownership="none">
+          <array name="GLib.Array" c:type="GArray**">
+            <type name="utf8"/>
+          </array>
+        </parameter>
+      </parameters>
+    </function>
+    <function name="garray_utf8_none_out"
+              c:identifier="g_i_marshalling_tests_garray_utf8_none_out">
+      <return-value transfer-ownership="none">
+        <type name="none" c:type="void"/>
+      </return-value>
+      <parameters>
+        <parameter name="array_"
+                   direction="out"
+                   caller-allocates="0"
+                   transfer-ownership="none">
+          <array name="GLib.Array" c:type="GArray**">
+            <type name="utf8"/>
+          </array>
+        </parameter>
+      </parameters>
+    </function>
+    <function name="garray_utf8_none_return"
+              c:identifier="g_i_marshalling_tests_garray_utf8_none_return">
+      <return-value transfer-ownership="none">
+        <array name="GLib.Array" c:type="GArray*">
+          <type name="utf8"/>
+        </array>
+      </return-value>
+    </function>
+    <function name="gclosure_in"
+              c:identifier="g_i_marshalling_tests_gclosure_in">
+      <return-value transfer-ownership="none">
+        <type name="none" c:type="void"/>
+      </return-value>
+      <parameters>
+        <parameter name="closure" transfer-ownership="none">
+          <type name="GObject.Closure" c:type="GClosure*"/>
+        </parameter>
+      </parameters>
+    </function>
+    <function name="genum_in" c:identifier="g_i_marshalling_tests_genum_in">
+      <return-value transfer-ownership="none">
+        <type name="none" c:type="void"/>
+      </return-value>
+      <parameters>
+        <parameter name="enum_" transfer-ownership="none">
+          <type name="GEnum" c:type="GIMarshallingTestsGEnum"/>
+        </parameter>
+      </parameters>
+    </function>
+    <function name="genum_inout"
+              c:identifier="g_i_marshalling_tests_genum_inout">
+      <return-value transfer-ownership="none">
+        <type name="none" c:type="void"/>
+      </return-value>
+      <parameters>
+        <parameter name="enum_"
+                   direction="inout"
+                   caller-allocates="0"
+                   transfer-ownership="full">
+          <type name="GEnum" c:type="GIMarshallingTestsGEnum*"/>
+        </parameter>
+      </parameters>
+    </function>
+    <function name="genum_out" c:identifier="g_i_marshalling_tests_genum_out">
+      <return-value transfer-ownership="none">
+        <type name="none" c:type="void"/>
+      </return-value>
+      <parameters>
+        <parameter name="enum_"
+                   direction="out"
+                   caller-allocates="1"
+                   transfer-ownership="none">
+          <type name="GEnum" c:type="GIMarshallingTestsGEnum*"/>
+        </parameter>
+      </parameters>
+    </function>
+    <function name="genum_return"
+              c:identifier="g_i_marshalling_tests_genum_return">
+      <return-value transfer-ownership="full">
+        <type name="Enum" c:type="GIMarshallingTestsEnum"/>
+      </return-value>
+    </function>
+    <function name="ghashtable_int_none_in"
+              c:identifier="g_i_marshalling_tests_ghashtable_int_none_in">
+      <return-value transfer-ownership="none">
+        <type name="none" c:type="void"/>
+      </return-value>
+      <parameters>
+        <parameter name="hash_table" transfer-ownership="none">
+          <type name="GLib.HashTable" c:type="GHashTable*">
+            <type name="int"/>
+            <type name="int"/>
+          </type>
+        </parameter>
+      </parameters>
+    </function>
+    <function name="ghashtable_int_none_return"
+              c:identifier="g_i_marshalling_tests_ghashtable_int_none_return">
+      <return-value transfer-ownership="none">
+        <type name="GLib.HashTable" c:type="GHashTable*">
+          <type name="int"/>
+          <type name="int"/>
+        </type>
+      </return-value>
+    </function>
+    <function name="ghashtable_utf8_container_in"
+              c:identifier="g_i_marshalling_tests_ghashtable_utf8_container_in">
+      <return-value transfer-ownership="none">
+        <type name="none" c:type="void"/>
+      </return-value>
+      <parameters>
+        <parameter name="hash_table" transfer-ownership="container">
+          <type name="GLib.HashTable" c:type="GHashTable*">
+            <type name="utf8"/>
+            <type name="utf8"/>
+          </type>
+        </parameter>
+      </parameters>
+    </function>
+    <function name="ghashtable_utf8_container_inout"
+              c:identifier="g_i_marshalling_tests_ghashtable_utf8_container_inout">
+      <return-value transfer-ownership="none">
+        <type name="none" c:type="void"/>
+      </return-value>
+      <parameters>
+        <parameter name="hash_table"
+                   direction="inout"
+                   caller-allocates="0"
+                   transfer-ownership="container">
+          <type name="GLib.HashTable" c:type="GHashTable**">
+            <type name="utf8"/>
+            <type name="utf8"/>
+          </type>
+        </parameter>
+      </parameters>
+    </function>
+    <function name="ghashtable_utf8_container_out"
+              c:identifier="g_i_marshalling_tests_ghashtable_utf8_container_out">
+      <return-value transfer-ownership="none">
+        <type name="none" c:type="void"/>
+      </return-value>
+      <parameters>
+        <parameter name="hash_table"
+                   direction="out"
+                   caller-allocates="0"
+                   transfer-ownership="container">
+          <type name="GLib.HashTable" c:type="GHashTable**">
+            <type name="utf8"/>
+            <type name="utf8"/>
+          </type>
+        </parameter>
+      </parameters>
+    </function>
+    <function name="ghashtable_utf8_container_return"
+              c:identifier="g_i_marshalling_tests_ghashtable_utf8_container_return">
+      <return-value transfer-ownership="container">
+        <type name="GLib.HashTable" c:type="GHashTable*">
+          <type name="utf8"/>
+          <type name="utf8"/>
+        </type>
+      </return-value>
+    </function>
+    <function name="ghashtable_utf8_full_in"
+              c:identifier="g_i_marshalling_tests_ghashtable_utf8_full_in">
+      <return-value transfer-ownership="none">
+        <type name="none" c:type="void"/>
+      </return-value>
+      <parameters>
+        <parameter name="hash_table" transfer-ownership="full">
+          <type name="GLib.HashTable" c:type="GHashTable*">
+            <type name="utf8"/>
+            <type name="utf8"/>
+          </type>
+        </parameter>
+      </parameters>
+    </function>
+    <function name="ghashtable_utf8_full_inout"
+              c:identifier="g_i_marshalling_tests_ghashtable_utf8_full_inout">
+      <return-value transfer-ownership="none">
+        <type name="none" c:type="void"/>
+      </return-value>
+      <parameters>
+        <parameter name="hash_table"
+                   direction="inout"
+                   caller-allocates="0"
+                   transfer-ownership="full">
+          <type name="GLib.HashTable" c:type="GHashTable**">
+            <type name="utf8"/>
+            <type name="utf8"/>
+          </type>
+        </parameter>
+      </parameters>
+    </function>
+    <function name="ghashtable_utf8_full_out"
+              c:identifier="g_i_marshalling_tests_ghashtable_utf8_full_out">
+      <return-value transfer-ownership="none">
+        <type name="none" c:type="void"/>
+      </return-value>
+      <parameters>
+        <parameter name="hash_table"
+                   direction="out"
+                   caller-allocates="0"
+                   transfer-ownership="full">
+          <type name="GLib.HashTable" c:type="GHashTable**">
+            <type name="utf8"/>
+            <type name="utf8"/>
+          </type>
+        </parameter>
+      </parameters>
+    </function>
+    <function name="ghashtable_utf8_full_return"
+              c:identifier="g_i_marshalling_tests_ghashtable_utf8_full_return">
+      <return-value transfer-ownership="full">
+        <type name="GLib.HashTable" c:type="GHashTable*">
+          <type name="utf8"/>
+          <type name="utf8"/>
+        </type>
+      </return-value>
+    </function>
+    <function name="ghashtable_utf8_none_in"
+              c:identifier="g_i_marshalling_tests_ghashtable_utf8_none_in">
+      <return-value transfer-ownership="none">
+        <type name="none" c:type="void"/>
+      </return-value>
+      <parameters>
+        <parameter name="hash_table" transfer-ownership="none">
+          <type name="GLib.HashTable" c:type="GHashTable*">
+            <type name="utf8"/>
+            <type name="utf8"/>
+          </type>
+        </parameter>
+      </parameters>
+    </function>
+    <function name="ghashtable_utf8_none_inout"
+              c:identifier="g_i_marshalling_tests_ghashtable_utf8_none_inout">
+      <return-value transfer-ownership="none">
+        <type name="none" c:type="void"/>
+      </return-value>
+      <parameters>
+        <parameter name="hash_table"
+                   direction="inout"
+                   caller-allocates="0"
+                   transfer-ownership="none">
+          <type name="GLib.HashTable" c:type="GHashTable**">
+            <type name="utf8"/>
+            <type name="utf8"/>
+          </type>
+        </parameter>
+      </parameters>
+    </function>
+    <function name="ghashtable_utf8_none_out"
+              c:identifier="g_i_marshalling_tests_ghashtable_utf8_none_out">
+      <return-value transfer-ownership="none">
+        <type name="none" c:type="void"/>
+      </return-value>
+      <parameters>
+        <parameter name="hash_table"
+                   direction="out"
+                   caller-allocates="0"
+                   transfer-ownership="none">
+          <type name="GLib.HashTable" c:type="GHashTable**">
+            <type name="utf8"/>
+            <type name="utf8"/>
+          </type>
+        </parameter>
+      </parameters>
+    </function>
+    <function name="ghashtable_utf8_none_return"
+              c:identifier="g_i_marshalling_tests_ghashtable_utf8_none_return">
+      <return-value transfer-ownership="none">
+        <type name="GLib.HashTable" c:type="GHashTable*">
+          <type name="utf8"/>
+          <type name="utf8"/>
+        </type>
+      </return-value>
+    </function>
+    <function name="glist_int_none_in"
+              c:identifier="g_i_marshalling_tests_glist_int_none_in">
+      <return-value transfer-ownership="none">
+        <type name="none" c:type="void"/>
+      </return-value>
+      <parameters>
+        <parameter name="list" transfer-ownership="none">
+          <type name="GLib.List" c:type="GList*">
+            <type name="int"/>
+          </type>
+        </parameter>
+      </parameters>
+    </function>
+    <function name="glist_int_none_return"
+              c:identifier="g_i_marshalling_tests_glist_int_none_return">
+      <return-value transfer-ownership="none">
+        <type name="GLib.List" c:type="GList*">
+          <type name="int"/>
+        </type>
+      </return-value>
+    </function>
+    <function name="glist_utf8_container_in"
+              c:identifier="g_i_marshalling_tests_glist_utf8_container_in">
+      <return-value transfer-ownership="none">
+        <type name="none" c:type="void"/>
+      </return-value>
+      <parameters>
+        <parameter name="list" transfer-ownership="container">
+          <type name="GLib.List" c:type="GList*">
+            <type name="utf8"/>
+          </type>
+        </parameter>
+      </parameters>
+    </function>
+    <function name="glist_utf8_container_inout"
+              c:identifier="g_i_marshalling_tests_glist_utf8_container_inout">
+      <return-value transfer-ownership="none">
+        <type name="none" c:type="void"/>
+      </return-value>
+      <parameters>
+        <parameter name="list"
+                   direction="inout"
+                   caller-allocates="0"
+                   transfer-ownership="container">
+          <type name="GLib.List" c:type="GList**">
+            <type name="utf8"/>
+          </type>
+        </parameter>
+      </parameters>
+    </function>
+    <function name="glist_utf8_container_out"
+              c:identifier="g_i_marshalling_tests_glist_utf8_container_out">
+      <return-value transfer-ownership="none">
+        <type name="none" c:type="void"/>
+      </return-value>
+      <parameters>
+        <parameter name="list"
+                   direction="out"
+                   caller-allocates="0"
+                   transfer-ownership="container">
+          <type name="GLib.List" c:type="GList**">
+            <type name="utf8"/>
+          </type>
+        </parameter>
+      </parameters>
+    </function>
+    <function name="glist_utf8_container_return"
+              c:identifier="g_i_marshalling_tests_glist_utf8_container_return">
+      <return-value transfer-ownership="container">
+        <type name="GLib.List" c:type="GList*">
+          <type name="utf8"/>
+        </type>
+      </return-value>
+    </function>
+    <function name="glist_utf8_full_in"
+              c:identifier="g_i_marshalling_tests_glist_utf8_full_in">
+      <return-value transfer-ownership="none">
+        <type name="none" c:type="void"/>
+      </return-value>
+      <parameters>
+        <parameter name="list" transfer-ownership="full">
+          <type name="GLib.List" c:type="GList*">
+            <type name="utf8"/>
+          </type>
+        </parameter>
+      </parameters>
+    </function>
+    <function name="glist_utf8_full_inout"
+              c:identifier="g_i_marshalling_tests_glist_utf8_full_inout">
+      <return-value transfer-ownership="none">
+        <type name="none" c:type="void"/>
+      </return-value>
+      <parameters>
+        <parameter name="list"
+                   direction="inout"
+                   caller-allocates="0"
+                   transfer-ownership="full">
+          <type name="GLib.List" c:type="GList**">
+            <type name="utf8"/>
+          </type>
+        </parameter>
+      </parameters>
+    </function>
+    <function name="glist_utf8_full_out"
+              c:identifier="g_i_marshalling_tests_glist_utf8_full_out">
+      <return-value transfer-ownership="none">
+        <type name="none" c:type="void"/>
+      </return-value>
+      <parameters>
+        <parameter name="list"
+                   direction="out"
+                   caller-allocates="0"
+                   transfer-ownership="full">
+          <type name="GLib.List" c:type="GList**">
+            <type name="utf8"/>
+          </type>
+        </parameter>
+      </parameters>
+    </function>
+    <function name="glist_utf8_full_return"
+              c:identifier="g_i_marshalling_tests_glist_utf8_full_return">
+      <return-value transfer-ownership="full">
+        <type name="GLib.List" c:type="GList*">
+          <type name="utf8"/>
+        </type>
+      </return-value>
+    </function>
+    <function name="glist_utf8_none_in"
+              c:identifier="g_i_marshalling_tests_glist_utf8_none_in">
+      <return-value transfer-ownership="none">
+        <type name="none" c:type="void"/>
+      </return-value>
+      <parameters>
+        <parameter name="list" transfer-ownership="none">
+          <type name="GLib.List" c:type="GList*">
+            <type name="utf8"/>
+          </type>
+        </parameter>
+      </parameters>
+    </function>
+    <function name="glist_utf8_none_inout"
+              c:identifier="g_i_marshalling_tests_glist_utf8_none_inout">
+      <return-value transfer-ownership="none">
+        <type name="none" c:type="void"/>
+      </return-value>
+      <parameters>
+        <parameter name="list"
+                   direction="inout"
+                   caller-allocates="0"
+                   transfer-ownership="none">
+          <type name="GLib.List" c:type="GList**">
+            <type name="utf8"/>
+          </type>
+        </parameter>
+      </parameters>
+    </function>
+    <function name="glist_utf8_none_out"
+              c:identifier="g_i_marshalling_tests_glist_utf8_none_out">
+      <return-value transfer-ownership="none">
+        <type name="none" c:type="void"/>
+      </return-value>
+      <parameters>
+        <parameter name="list"
+                   direction="out"
+                   caller-allocates="0"
+                   transfer-ownership="none">
+          <type name="GLib.List" c:type="GList**">
+            <type name="utf8"/>
+          </type>
+        </parameter>
+      </parameters>
+    </function>
+    <function name="glist_utf8_none_return"
+              c:identifier="g_i_marshalling_tests_glist_utf8_none_return">
+      <return-value transfer-ownership="none">
+        <type name="GLib.List" c:type="GList*">
+          <type name="utf8"/>
+        </type>
+      </return-value>
+    </function>
+    <function name="gslist_int_none_in"
+              c:identifier="g_i_marshalling_tests_gslist_int_none_in">
+      <return-value transfer-ownership="none">
+        <type name="none" c:type="void"/>
+      </return-value>
+      <parameters>
+        <parameter name="list" transfer-ownership="none">
+          <type name="GLib.SList" c:type="GSList*">
+            <type name="int"/>
+          </type>
+        </parameter>
+      </parameters>
+    </function>
+    <function name="gslist_int_none_return"
+              c:identifier="g_i_marshalling_tests_gslist_int_none_return">
+      <return-value transfer-ownership="none">
+        <type name="GLib.SList" c:type="GSList*">
+          <type name="int"/>
+        </type>
+      </return-value>
+    </function>
+    <function name="gslist_utf8_container_in"
+              c:identifier="g_i_marshalling_tests_gslist_utf8_container_in">
+      <return-value transfer-ownership="none">
+        <type name="none" c:type="void"/>
+      </return-value>
+      <parameters>
+        <parameter name="list" transfer-ownership="container">
+          <type name="GLib.SList" c:type="GSList*">
+            <type name="utf8"/>
+          </type>
+        </parameter>
+      </parameters>
+    </function>
+    <function name="gslist_utf8_container_inout"
+              c:identifier="g_i_marshalling_tests_gslist_utf8_container_inout">
+      <return-value transfer-ownership="none">
+        <type name="none" c:type="void"/>
+      </return-value>
+      <parameters>
+        <parameter name="list"
+                   direction="inout"
+                   caller-allocates="0"
+                   transfer-ownership="container">
+          <type name="GLib.SList" c:type="GSList**">
+            <type name="utf8"/>
+          </type>
+        </parameter>
+      </parameters>
+    </function>
+    <function name="gslist_utf8_container_out"
+              c:identifier="g_i_marshalling_tests_gslist_utf8_container_out">
+      <return-value transfer-ownership="none">
+        <type name="none" c:type="void"/>
+      </return-value>
+      <parameters>
+        <parameter name="list"
+                   direction="out"
+                   caller-allocates="0"
+                   transfer-ownership="container">
+          <type name="GLib.SList" c:type="GSList**">
+            <type name="utf8"/>
+          </type>
+        </parameter>
+      </parameters>
+    </function>
+    <function name="gslist_utf8_container_return"
+              c:identifier="g_i_marshalling_tests_gslist_utf8_container_return">
+      <return-value transfer-ownership="container">
+        <type name="GLib.SList" c:type="GSList*">
+          <type name="utf8"/>
+        </type>
+      </return-value>
+    </function>
+    <function name="gslist_utf8_full_in"
+              c:identifier="g_i_marshalling_tests_gslist_utf8_full_in">
+      <return-value transfer-ownership="none">
+        <type name="none" c:type="void"/>
+      </return-value>
+      <parameters>
+        <parameter name="list" transfer-ownership="full">
+          <type name="GLib.SList" c:type="GSList*">
+            <type name="utf8"/>
+          </type>
+        </parameter>
+      </parameters>
+    </function>
+    <function name="gslist_utf8_full_inout"
+              c:identifier="g_i_marshalling_tests_gslist_utf8_full_inout">
+      <return-value transfer-ownership="none">
+        <type name="none" c:type="void"/>
+      </return-value>
+      <parameters>
+        <parameter name="list"
+                   direction="inout"
+                   caller-allocates="0"
+                   transfer-ownership="full">
+          <type name="GLib.SList" c:type="GSList**">
+            <type name="utf8"/>
+          </type>
+        </parameter>
+      </parameters>
+    </function>
+    <function name="gslist_utf8_full_out"
+              c:identifier="g_i_marshalling_tests_gslist_utf8_full_out">
+      <return-value transfer-ownership="none">
+        <type name="none" c:type="void"/>
+      </return-value>
+      <parameters>
+        <parameter name="list"
+                   direction="out"
+                   caller-allocates="0"
+                   transfer-ownership="full">
+          <type name="GLib.SList" c:type="GSList**">
+            <type name="utf8"/>
+          </type>
+        </parameter>
+      </parameters>
+    </function>
+    <function name="gslist_utf8_full_return"
+              c:identifier="g_i_marshalling_tests_gslist_utf8_full_return">
+      <return-value transfer-ownership="full">
+        <type name="GLib.SList" c:type="GSList*">
+          <type name="utf8"/>
+        </type>
+      </return-value>
+    </function>
+    <function name="gslist_utf8_none_in"
+              c:identifier="g_i_marshalling_tests_gslist_utf8_none_in">
+      <return-value transfer-ownership="none">
+        <type name="none" c:type="void"/>
+      </return-value>
+      <parameters>
+        <parameter name="list" transfer-ownership="none">
+          <type name="GLib.SList" c:type="GSList*">
+            <type name="utf8"/>
+          </type>
+        </parameter>
+      </parameters>
+    </function>
+    <function name="gslist_utf8_none_inout"
+              c:identifier="g_i_marshalling_tests_gslist_utf8_none_inout">
+      <return-value transfer-ownership="none">
+        <type name="none" c:type="void"/>
+      </return-value>
+      <parameters>
+        <parameter name="list"
+                   direction="inout"
+                   caller-allocates="0"
+                   transfer-ownership="none">
+          <type name="GLib.SList" c:type="GSList**">
+            <type name="utf8"/>
+          </type>
+        </parameter>
+      </parameters>
+    </function>
+    <function name="gslist_utf8_none_out"
+              c:identifier="g_i_marshalling_tests_gslist_utf8_none_out">
+      <return-value transfer-ownership="none">
+        <type name="none" c:type="void"/>
+      </return-value>
+      <parameters>
+        <parameter name="list"
+                   direction="out"
+                   caller-allocates="0"
+                   transfer-ownership="none">
+          <type name="GLib.SList" c:type="GSList**">
+            <type name="utf8"/>
+          </type>
+        </parameter>
+      </parameters>
+    </function>
+    <function name="gslist_utf8_none_return"
+              c:identifier="g_i_marshalling_tests_gslist_utf8_none_return">
+      <return-value transfer-ownership="none">
+        <type name="GLib.SList" c:type="GSList*">
+          <type name="utf8"/>
+        </type>
+      </return-value>
+    </function>
+    <function name="gstrv_in" c:identifier="g_i_marshalling_tests_gstrv_in">
+      <return-value transfer-ownership="none">
+        <type name="none" c:type="void"/>
+      </return-value>
+      <parameters>
+        <parameter name="g_strv" transfer-ownership="none">
+          <array c:type="GStrv">
+            <type name="utf8"/>
+          </array>
+        </parameter>
+      </parameters>
+    </function>
+    <function name="gstrv_inout"
+              c:identifier="g_i_marshalling_tests_gstrv_inout">
+      <return-value transfer-ownership="none">
+        <type name="none" c:type="void"/>
+      </return-value>
+      <parameters>
+        <parameter name="g_strv"
+                   direction="inout"
+                   caller-allocates="0"
+                   transfer-ownership="none">
+          <array c:type="GStrv*">
+            <type name="utf8"/>
+          </array>
+        </parameter>
+      </parameters>
+    </function>
+    <function name="gstrv_out" c:identifier="g_i_marshalling_tests_gstrv_out">
+      <return-value transfer-ownership="none">
+        <type name="none" c:type="void"/>
+      </return-value>
+      <parameters>
+        <parameter name="g_strv"
+                   direction="out"
+                   caller-allocates="1"
+                   transfer-ownership="none">
+          <array c:type="GStrv*">
+            <type name="utf8"/>
+          </array>
+        </parameter>
+      </parameters>
+    </function>
+    <function name="gstrv_return"
+              c:identifier="g_i_marshalling_tests_gstrv_return">
+      <return-value transfer-ownership="full">
+        <doc xml:whitespace="preserve">an array of strings</doc>
+        <array c:type="GStrv">
+          <type name="utf8"/>
+        </array>
+      </return-value>
+    </function>
+    <function name="gtype_in" c:identifier="g_i_marshalling_tests_gtype_in">
+      <return-value transfer-ownership="none">
+        <type name="none" c:type="void"/>
+      </return-value>
+      <parameters>
+        <parameter name="gtype" transfer-ownership="none">
+          <type name="GType" c:type="GType"/>
+        </parameter>
+      </parameters>
+    </function>
+    <function name="gtype_inout"
+              c:identifier="g_i_marshalling_tests_gtype_inout">
+      <return-value transfer-ownership="none">
+        <type name="none" c:type="void"/>
+      </return-value>
+      <parameters>
+        <parameter name="gtype"
+                   direction="inout"
+                   caller-allocates="0"
+                   transfer-ownership="full">
+          <type name="GType" c:type="GType*"/>
+        </parameter>
+      </parameters>
+    </function>
+    <function name="gtype_out" c:identifier="g_i_marshalling_tests_gtype_out">
+      <return-value transfer-ownership="none">
+        <type name="none" c:type="void"/>
+      </return-value>
+      <parameters>
+        <parameter name="gtype"
+                   direction="out"
+                   caller-allocates="0"
+                   transfer-ownership="full">
+          <type name="GType" c:type="GType*"/>
+        </parameter>
+      </parameters>
+    </function>
+    <function name="gtype_return"
+              c:identifier="g_i_marshalling_tests_gtype_return">
+      <return-value transfer-ownership="none">
+        <type name="GType" c:type="GType"/>
+      </return-value>
+    </function>
+    <function name="gvalue_in" c:identifier="g_i_marshalling_tests_gvalue_in">
+      <return-value transfer-ownership="none">
+        <type name="none" c:type="void"/>
+      </return-value>
+      <parameters>
+        <parameter name="value" transfer-ownership="none">
+          <type name="GObject.Value" c:type="GValue*"/>
+        </parameter>
+      </parameters>
+    </function>
+    <function name="gvalue_inout"
+              c:identifier="g_i_marshalling_tests_gvalue_inout">
+      <return-value transfer-ownership="none">
+        <type name="none" c:type="void"/>
+      </return-value>
+      <parameters>
+        <parameter name="value"
+                   direction="inout"
+                   caller-allocates="0"
+                   transfer-ownership="none">
+          <type name="GObject.Value" c:type="GValue**"/>
+        </parameter>
+      </parameters>
+    </function>
+    <function name="gvalue_out"
+              c:identifier="g_i_marshalling_tests_gvalue_out">
+      <return-value transfer-ownership="none">
+        <type name="none" c:type="void"/>
+      </return-value>
+      <parameters>
+        <parameter name="value"
+                   direction="out"
+                   caller-allocates="0"
+                   transfer-ownership="none">
+          <type name="GObject.Value" c:type="GValue**"/>
+        </parameter>
+      </parameters>
+    </function>
+    <function name="gvalue_return"
+              c:identifier="g_i_marshalling_tests_gvalue_return">
+      <return-value transfer-ownership="none">
+        <type name="GObject.Value" c:type="GValue*"/>
+      </return-value>
+    </function>
+    <function name="int16_in_max"
+              c:identifier="g_i_marshalling_tests_int16_in_max">
+      <return-value transfer-ownership="none">
+        <type name="none" c:type="void"/>
+      </return-value>
+      <parameters>
+        <parameter name="int16" transfer-ownership="none">
+          <type name="int16" c:type="gint16"/>
+        </parameter>
+      </parameters>
+    </function>
+    <function name="int16_in_min"
+              c:identifier="g_i_marshalling_tests_int16_in_min">
+      <return-value transfer-ownership="none">
+        <type name="none" c:type="void"/>
+      </return-value>
+      <parameters>
+        <parameter name="int16" transfer-ownership="none">
+          <type name="int16" c:type="gint16"/>
+        </parameter>
+      </parameters>
+    </function>
+    <function name="int16_inout_max_min"
+              c:identifier="g_i_marshalling_tests_int16_inout_max_min">
+      <return-value transfer-ownership="none">
+        <type name="none" c:type="void"/>
+      </return-value>
+      <parameters>
+        <parameter name="int16"
+                   direction="inout"
+                   caller-allocates="0"
+                   transfer-ownership="full">
+          <type name="int16" c:type="gint16*"/>
+        </parameter>
+      </parameters>
+    </function>
+    <function name="int16_inout_min_max"
+              c:identifier="g_i_marshalling_tests_int16_inout_min_max">
+      <return-value transfer-ownership="none">
+        <type name="none" c:type="void"/>
+      </return-value>
+      <parameters>
+        <parameter name="int16"
+                   direction="inout"
+                   caller-allocates="0"
+                   transfer-ownership="full">
+          <type name="int16" c:type="gint16*"/>
+        </parameter>
+      </parameters>
+    </function>
+    <function name="int16_out_max"
+              c:identifier="g_i_marshalling_tests_int16_out_max">
+      <return-value transfer-ownership="none">
+        <type name="none" c:type="void"/>
+      </return-value>
+      <parameters>
+        <parameter name="int16"
+                   direction="out"
+                   caller-allocates="0"
+                   transfer-ownership="full">
+          <type name="int16" c:type="gint16*"/>
+        </parameter>
+      </parameters>
+    </function>
+    <function name="int16_out_min"
+              c:identifier="g_i_marshalling_tests_int16_out_min">
+      <return-value transfer-ownership="none">
+        <type name="none" c:type="void"/>
+      </return-value>
+      <parameters>
+        <parameter name="int16"
+                   direction="out"
+                   caller-allocates="0"
+                   transfer-ownership="full">
+          <type name="int16" c:type="gint16*"/>
+        </parameter>
+      </parameters>
+    </function>
+    <function name="int16_return_max"
+              c:identifier="g_i_marshalling_tests_int16_return_max">
+      <return-value transfer-ownership="none">
+        <type name="int16" c:type="gint16"/>
+      </return-value>
+    </function>
+    <function name="int16_return_min"
+              c:identifier="g_i_marshalling_tests_int16_return_min">
+      <return-value transfer-ownership="none">
+        <type name="int16" c:type="gint16"/>
+      </return-value>
+    </function>
+    <function name="int32_in_max"
+              c:identifier="g_i_marshalling_tests_int32_in_max">
+      <return-value transfer-ownership="none">
+        <type name="none" c:type="void"/>
+      </return-value>
+      <parameters>
+        <parameter name="int32" transfer-ownership="none">
+          <type name="int32" c:type="gint32"/>
+        </parameter>
+      </parameters>
+    </function>
+    <function name="int32_in_min"
+              c:identifier="g_i_marshalling_tests_int32_in_min">
+      <return-value transfer-ownership="none">
+        <type name="none" c:type="void"/>
+      </return-value>
+      <parameters>
+        <parameter name="int32" transfer-ownership="none">
+          <type name="int32" c:type="gint32"/>
+        </parameter>
+      </parameters>
+    </function>
+    <function name="int32_inout_max_min"
+              c:identifier="g_i_marshalling_tests_int32_inout_max_min">
+      <return-value transfer-ownership="none">
+        <type name="none" c:type="void"/>
+      </return-value>
+      <parameters>
+        <parameter name="int32"
+                   direction="inout"
+                   caller-allocates="0"
+                   transfer-ownership="full">
+          <type name="int32" c:type="gint32*"/>
+        </parameter>
+      </parameters>
+    </function>
+    <function name="int32_inout_min_max"
+              c:identifier="g_i_marshalling_tests_int32_inout_min_max">
+      <return-value transfer-ownership="none">
+        <type name="none" c:type="void"/>
+      </return-value>
+      <parameters>
+        <parameter name="int32"
+                   direction="inout"
+                   caller-allocates="0"
+                   transfer-ownership="full">
+          <type name="int32" c:type="gint32*"/>
+        </parameter>
+      </parameters>
+    </function>
+    <function name="int32_out_max"
+              c:identifier="g_i_marshalling_tests_int32_out_max">
+      <return-value transfer-ownership="none">
+        <type name="none" c:type="void"/>
+      </return-value>
+      <parameters>
+        <parameter name="int32"
+                   direction="out"
+                   caller-allocates="0"
+                   transfer-ownership="full">
+          <type name="int32" c:type="gint32*"/>
+        </parameter>
+      </parameters>
+    </function>
+    <function name="int32_out_min"
+              c:identifier="g_i_marshalling_tests_int32_out_min">
+      <return-value transfer-ownership="none">
+        <type name="none" c:type="void"/>
+      </return-value>
+      <parameters>
+        <parameter name="int32"
+                   direction="out"
+                   caller-allocates="0"
+                   transfer-ownership="full">
+          <type name="int32" c:type="gint32*"/>
+        </parameter>
+      </parameters>
+    </function>
+    <function name="int32_return_max"
+              c:identifier="g_i_marshalling_tests_int32_return_max">
+      <return-value transfer-ownership="none">
+        <type name="int32" c:type="gint32"/>
+      </return-value>
+    </function>
+    <function name="int32_return_min"
+              c:identifier="g_i_marshalling_tests_int32_return_min">
+      <return-value transfer-ownership="none">
+        <type name="int32" c:type="gint32"/>
+      </return-value>
+    </function>
+    <function name="int64_in_max"
+              c:identifier="g_i_marshalling_tests_int64_in_max">
+      <return-value transfer-ownership="none">
+        <type name="none" c:type="void"/>
+      </return-value>
+      <parameters>
+        <parameter name="int64" transfer-ownership="none">
+          <type name="int64" c:type="gint64"/>
+        </parameter>
+      </parameters>
+    </function>
+    <function name="int64_in_min"
+              c:identifier="g_i_marshalling_tests_int64_in_min">
+      <return-value transfer-ownership="none">
+        <type name="none" c:type="void"/>
+      </return-value>
+      <parameters>
+        <parameter name="int64" transfer-ownership="none">
+          <type name="int64" c:type="gint64"/>
+        </parameter>
+      </parameters>
+    </function>
+    <function name="int64_inout_max_min"
+              c:identifier="g_i_marshalling_tests_int64_inout_max_min">
+      <return-value transfer-ownership="none">
+        <type name="none" c:type="void"/>
+      </return-value>
+      <parameters>
+        <parameter name="int64"
+                   direction="inout"
+                   caller-allocates="0"
+                   transfer-ownership="full">
+          <type name="int64" c:type="gint64*"/>
+        </parameter>
+      </parameters>
+    </function>
+    <function name="int64_inout_min_max"
+              c:identifier="g_i_marshalling_tests_int64_inout_min_max">
+      <return-value transfer-ownership="none">
+        <type name="none" c:type="void"/>
+      </return-value>
+      <parameters>
+        <parameter name="int64"
+                   direction="inout"
+                   caller-allocates="0"
+                   transfer-ownership="full">
+          <type name="int64" c:type="gint64*"/>
+        </parameter>
+      </parameters>
+    </function>
+    <function name="int64_out_max"
+              c:identifier="g_i_marshalling_tests_int64_out_max">
+      <return-value transfer-ownership="none">
+        <type name="none" c:type="void"/>
+      </return-value>
+      <parameters>
+        <parameter name="int64"
+                   direction="out"
+                   caller-allocates="0"
+                   transfer-ownership="full">
+          <type name="int64" c:type="gint64*"/>
+        </parameter>
+      </parameters>
+    </function>
+    <function name="int64_out_min"
+              c:identifier="g_i_marshalling_tests_int64_out_min">
+      <return-value transfer-ownership="none">
+        <type name="none" c:type="void"/>
+      </return-value>
+      <parameters>
+        <parameter name="int64"
+                   direction="out"
+                   caller-allocates="0"
+                   transfer-ownership="full">
+          <type name="int64" c:type="gint64*"/>
+        </parameter>
+      </parameters>
+    </function>
+    <function name="int64_return_max"
+              c:identifier="g_i_marshalling_tests_int64_return_max">
+      <return-value transfer-ownership="none">
+        <type name="int64" c:type="gint64"/>
+      </return-value>
+    </function>
+    <function name="int64_return_min"
+              c:identifier="g_i_marshalling_tests_int64_return_min">
+      <return-value transfer-ownership="none">
+        <type name="int64" c:type="gint64"/>
+      </return-value>
+    </function>
+    <function name="int8_in_max"
+              c:identifier="g_i_marshalling_tests_int8_in_max">
+      <return-value transfer-ownership="none">
+        <type name="none" c:type="void"/>
+      </return-value>
+      <parameters>
+        <parameter name="int8" transfer-ownership="none">
+          <type name="int8" c:type="gint8"/>
+        </parameter>
+      </parameters>
+    </function>
+    <function name="int8_in_min"
+              c:identifier="g_i_marshalling_tests_int8_in_min">
+      <return-value transfer-ownership="none">
+        <type name="none" c:type="void"/>
+      </return-value>
+      <parameters>
+        <parameter name="int8" transfer-ownership="none">
+          <type name="int8" c:type="gint8"/>
+        </parameter>
+      </parameters>
+    </function>
+    <function name="int8_inout_max_min"
+              c:identifier="g_i_marshalling_tests_int8_inout_max_min">
+      <return-value transfer-ownership="none">
+        <type name="none" c:type="void"/>
+      </return-value>
+      <parameters>
+        <parameter name="int8"
+                   direction="inout"
+                   caller-allocates="0"
+                   transfer-ownership="full">
+          <type name="int8" c:type="gint8*"/>
+        </parameter>
+      </parameters>
+    </function>
+    <function name="int8_inout_min_max"
+              c:identifier="g_i_marshalling_tests_int8_inout_min_max">
+      <return-value transfer-ownership="none">
+        <type name="none" c:type="void"/>
+      </return-value>
+      <parameters>
+        <parameter name="int8"
+                   direction="inout"
+                   caller-allocates="0"
+                   transfer-ownership="full">
+          <type name="int8" c:type="gint8*"/>
+        </parameter>
+      </parameters>
+    </function>
+    <function name="int8_out_max"
+              c:identifier="g_i_marshalling_tests_int8_out_max">
+      <return-value transfer-ownership="none">
+        <type name="none" c:type="void"/>
+      </return-value>
+      <parameters>
+        <parameter name="int8"
+                   direction="out"
+                   caller-allocates="0"
+                   transfer-ownership="full">
+          <type name="int8" c:type="gint8*"/>
+        </parameter>
+      </parameters>
+    </function>
+    <function name="int8_out_min"
+              c:identifier="g_i_marshalling_tests_int8_out_min">
+      <return-value transfer-ownership="none">
+        <type name="none" c:type="void"/>
+      </return-value>
+      <parameters>
+        <parameter name="int8"
+                   direction="out"
+                   caller-allocates="0"
+                   transfer-ownership="full">
+          <type name="int8" c:type="gint8*"/>
+        </parameter>
+      </parameters>
+    </function>
+    <function name="int8_return_max"
+              c:identifier="g_i_marshalling_tests_int8_return_max">
+      <return-value transfer-ownership="none">
+        <type name="int8" c:type="gint8"/>
+      </return-value>
+    </function>
+    <function name="int8_return_min"
+              c:identifier="g_i_marshalling_tests_int8_return_min">
+      <return-value transfer-ownership="none">
+        <type name="int8" c:type="gint8"/>
+      </return-value>
+    </function>
+    <function name="int_in_max"
+              c:identifier="g_i_marshalling_tests_int_in_max">
+      <return-value transfer-ownership="none">
+        <type name="none" c:type="void"/>
+      </return-value>
+      <parameters>
+        <parameter name="int_" transfer-ownership="none">
+          <type name="int" c:type="gint"/>
+        </parameter>
+      </parameters>
+    </function>
+    <function name="int_in_min"
+              c:identifier="g_i_marshalling_tests_int_in_min">
+      <return-value transfer-ownership="none">
+        <type name="none" c:type="void"/>
+      </return-value>
+      <parameters>
+        <parameter name="int_" transfer-ownership="none">
+          <type name="int" c:type="gint"/>
+        </parameter>
+      </parameters>
+    </function>
+    <function name="int_inout_max_min"
+              c:identifier="g_i_marshalling_tests_int_inout_max_min">
+      <return-value transfer-ownership="none">
+        <type name="none" c:type="void"/>
+      </return-value>
+      <parameters>
+        <parameter name="int_"
+                   direction="inout"
+                   caller-allocates="0"
+                   transfer-ownership="full">
+          <type name="int" c:type="gint*"/>
+        </parameter>
+      </parameters>
+    </function>
+    <function name="int_inout_min_max"
+              c:identifier="g_i_marshalling_tests_int_inout_min_max">
+      <return-value transfer-ownership="none">
+        <type name="none" c:type="void"/>
+      </return-value>
+      <parameters>
+        <parameter name="int_"
+                   direction="inout"
+                   caller-allocates="0"
+                   transfer-ownership="full">
+          <type name="int" c:type="gint*"/>
+        </parameter>
+      </parameters>
+    </function>
+    <function name="int_out_in"
+              c:identifier="g_i_marshalling_tests_int_out_in">
+      <return-value transfer-ownership="none">
+        <type name="none" c:type="void"/>
+      </return-value>
+      <parameters>
+        <parameter name="int0"
+                   direction="out"
+                   caller-allocates="0"
+                   transfer-ownership="full">
+          <type name="int" c:type="gint*"/>
+        </parameter>
+        <parameter name="int1" transfer-ownership="none">
+          <type name="int" c:type="gint"/>
+        </parameter>
+      </parameters>
+    </function>
+    <function name="int_out_max"
+              c:identifier="g_i_marshalling_tests_int_out_max">
+      <return-value transfer-ownership="none">
+        <type name="none" c:type="void"/>
+      </return-value>
+      <parameters>
+        <parameter name="int_"
+                   direction="out"
+                   caller-allocates="0"
+                   transfer-ownership="full">
+          <type name="int" c:type="gint*"/>
+        </parameter>
+      </parameters>
+    </function>
+    <function name="int_out_min"
+              c:identifier="g_i_marshalling_tests_int_out_min">
+      <return-value transfer-ownership="none">
+        <type name="none" c:type="void"/>
+      </return-value>
+      <parameters>
+        <parameter name="int_"
+                   direction="out"
+                   caller-allocates="0"
+                   transfer-ownership="full">
+          <type name="int" c:type="gint*"/>
+        </parameter>
+      </parameters>
+    </function>
+    <function name="int_out_out"
+              c:identifier="g_i_marshalling_tests_int_out_out">
+      <return-value transfer-ownership="none">
+        <type name="none" c:type="void"/>
+      </return-value>
+      <parameters>
+        <parameter name="int0"
+                   direction="out"
+                   caller-allocates="0"
+                   transfer-ownership="full">
+          <type name="int" c:type="gint*"/>
+        </parameter>
+        <parameter name="int1"
+                   direction="out"
+                   caller-allocates="0"
+                   transfer-ownership="full">
+          <type name="int" c:type="gint*"/>
+        </parameter>
+      </parameters>
+    </function>
+    <function name="int_return_max"
+              c:identifier="g_i_marshalling_tests_int_return_max">
+      <return-value transfer-ownership="none">
+        <type name="int" c:type="gint"/>
+      </return-value>
+    </function>
+    <function name="int_return_min"
+              c:identifier="g_i_marshalling_tests_int_return_min">
+      <return-value transfer-ownership="none">
+        <type name="int" c:type="gint"/>
+      </return-value>
+    </function>
+    <function name="int_return_out"
+              c:identifier="g_i_marshalling_tests_int_return_out">
+      <return-value transfer-ownership="none">
+        <type name="int" c:type="gint"/>
+      </return-value>
+      <parameters>
+        <parameter name="int_"
+                   direction="out"
+                   caller-allocates="0"
+                   transfer-ownership="full">
+          <type name="int" c:type="gint*"/>
+        </parameter>
+      </parameters>
+    </function>
+    <function name="long_in_max"
+              c:identifier="g_i_marshalling_tests_long_in_max">
+      <return-value transfer-ownership="none">
+        <type name="none" c:type="void"/>
+      </return-value>
+      <parameters>
+        <parameter name="long_" transfer-ownership="none">
+          <type name="long" c:type="glong"/>
+        </parameter>
+      </parameters>
+    </function>
+    <function name="long_in_min"
+              c:identifier="g_i_marshalling_tests_long_in_min">
+      <return-value transfer-ownership="none">
+        <type name="none" c:type="void"/>
+      </return-value>
+      <parameters>
+        <parameter name="long_" transfer-ownership="none">
+          <type name="long" c:type="glong"/>
+        </parameter>
+      </parameters>
+    </function>
+    <function name="long_inout_max_min"
+              c:identifier="g_i_marshalling_tests_long_inout_max_min">
+      <return-value transfer-ownership="none">
+        <type name="none" c:type="void"/>
+      </return-value>
+      <parameters>
+        <parameter name="long_"
+                   direction="inout"
+                   caller-allocates="0"
+                   transfer-ownership="full">
+          <type name="long" c:type="glong*"/>
+        </parameter>
+      </parameters>
+    </function>
+    <function name="long_inout_min_max"
+              c:identifier="g_i_marshalling_tests_long_inout_min_max">
+      <return-value transfer-ownership="none">
+        <type name="none" c:type="void"/>
+      </return-value>
+      <parameters>
+        <parameter name="long_"
+                   direction="inout"
+                   caller-allocates="0"
+                   transfer-ownership="full">
+          <type name="long" c:type="glong*"/>
+        </parameter>
+      </parameters>
+    </function>
+    <function name="long_out_max"
+              c:identifier="g_i_marshalling_tests_long_out_max">
+      <return-value transfer-ownership="none">
+        <type name="none" c:type="void"/>
+      </return-value>
+      <parameters>
+        <parameter name="long_"
+                   direction="out"
+                   caller-allocates="0"
+                   transfer-ownership="full">
+          <type name="long" c:type="glong*"/>
+        </parameter>
+      </parameters>
+    </function>
+    <function name="long_out_min"
+              c:identifier="g_i_marshalling_tests_long_out_min">
+      <return-value transfer-ownership="none">
+        <type name="none" c:type="void"/>
+      </return-value>
+      <parameters>
+        <parameter name="long_"
+                   direction="out"
+                   caller-allocates="0"
+                   transfer-ownership="full">
+          <type name="long" c:type="glong*"/>
+        </parameter>
+      </parameters>
+    </function>
+    <function name="long_return_max"
+              c:identifier="g_i_marshalling_tests_long_return_max">
+      <return-value transfer-ownership="none">
+        <type name="long" c:type="glong"/>
+      </return-value>
+    </function>
+    <function name="long_return_min"
+              c:identifier="g_i_marshalling_tests_long_return_min">
+      <return-value transfer-ownership="none">
+        <type name="long" c:type="glong"/>
+      </return-value>
+    </function>
+    <function name="object_full_in"
+              c:identifier="g_i_marshalling_tests__object_full_in">
+      <return-value transfer-ownership="none">
+        <type name="none" c:type="void"/>
+      </return-value>
+      <parameters>
+        <parameter name="object" transfer-ownership="full">
+          <type name="Object" c:type="GIMarshallingTestsObject*"/>
+        </parameter>
+      </parameters>
+    </function>
+    <function name="object_full_inout"
+              c:identifier="g_i_marshalling_tests__object_full_inout">
+      <return-value transfer-ownership="none">
+        <type name="none" c:type="void"/>
+      </return-value>
+      <parameters>
+        <parameter name="object"
+                   direction="inout"
+                   caller-allocates="0"
+                   transfer-ownership="full">
+          <type name="Object" c:type="GIMarshallingTestsObject**"/>
+        </parameter>
+      </parameters>
+    </function>
+    <function name="object_full_out"
+              c:identifier="g_i_marshalling_tests__object_full_out">
+      <return-value transfer-ownership="none">
+        <type name="none" c:type="void"/>
+      </return-value>
+      <parameters>
+        <parameter name="object"
+                   direction="out"
+                   caller-allocates="0"
+                   transfer-ownership="full">
+          <type name="Object" c:type="GIMarshallingTestsObject**"/>
+        </parameter>
+      </parameters>
+    </function>
+    <function name="object_full_return"
+              c:identifier="g_i_marshalling_tests__object_full_return">
+      <return-value transfer-ownership="full">
+        <type name="Object" c:type="GIMarshallingTestsObject*"/>
+      </return-value>
+    </function>
+    <function name="object_inout_same"
+              c:identifier="g_i_marshalling_tests__object_inout_same">
+      <return-value transfer-ownership="none">
+        <type name="none" c:type="void"/>
+      </return-value>
+      <parameters>
+        <parameter name="object"
+                   direction="inout"
+                   caller-allocates="0"
+                   transfer-ownership="full">
+          <type name="Object" c:type="GIMarshallingTestsObject**"/>
+        </parameter>
+      </parameters>
+    </function>
+    <function name="object_int8_in"
+              c:identifier="g_i_marshalling_tests__object_int8_in">
+      <return-value transfer-ownership="none">
+        <type name="none" c:type="void"/>
+      </return-value>
+      <parameters>
+        <parameter name="object" transfer-ownership="none">
+          <type name="Object" c:type="GIMarshallingTestsObject*"/>
+        </parameter>
+        <parameter name="in" transfer-ownership="none">
+          <type name="int8" c:type="gint8"/>
+        </parameter>
+      </parameters>
+    </function>
+    <function name="object_int8_out"
+              c:identifier="g_i_marshalling_tests__object_int8_out">
+      <return-value transfer-ownership="none">
+        <type name="none" c:type="void"/>
+      </return-value>
+      <parameters>
+        <parameter name="object" transfer-ownership="none">
+          <type name="Object" c:type="GIMarshallingTestsObject*"/>
+        </parameter>
+        <parameter name="out"
+                   direction="out"
+                   caller-allocates="0"
+                   transfer-ownership="full">
+          <type name="int8" c:type="gint8*"/>
+        </parameter>
+      </parameters>
+    </function>
+    <function name="object_none_in"
+              c:identifier="g_i_marshalling_tests__object_none_in">
+      <return-value transfer-ownership="none">
+        <type name="none" c:type="void"/>
+      </return-value>
+      <parameters>
+        <parameter name="object" transfer-ownership="none">
+          <type name="Object" c:type="GIMarshallingTestsObject*"/>
+        </parameter>
+      </parameters>
+    </function>
+    <function name="object_none_inout"
+              c:identifier="g_i_marshalling_tests__object_none_inout">
+      <return-value transfer-ownership="none">
+        <type name="none" c:type="void"/>
+      </return-value>
+      <parameters>
+        <parameter name="object"
+                   direction="inout"
+                   caller-allocates="0"
+                   transfer-ownership="none">
+          <type name="Object" c:type="GIMarshallingTestsObject**"/>
+        </parameter>
+      </parameters>
+    </function>
+    <function name="object_none_out"
+              c:identifier="g_i_marshalling_tests__object_none_out">
+      <return-value transfer-ownership="none">
+        <type name="none" c:type="void"/>
+      </return-value>
+      <parameters>
+        <parameter name="object"
+                   direction="out"
+                   caller-allocates="0"
+                   transfer-ownership="none">
+          <type name="Object" c:type="GIMarshallingTestsObject**"/>
+        </parameter>
+      </parameters>
+    </function>
+    <function name="object_none_return"
+              c:identifier="g_i_marshalling_tests__object_none_return">
+      <return-value transfer-ownership="none">
+        <type name="Object" c:type="GIMarshallingTestsObject*"/>
+      </return-value>
+    </function>
+    <function name="overrides_object_return"
+              c:identifier="g_i_marshalling_tests__overrides_object_return">
+      <return-value transfer-ownership="full">
+        <type name="OverridesObject"
+              c:type="GIMarshallingTestsOverridesObject*"/>
+      </return-value>
+    </function>
+    <function name="overrides_struct_return"
+              c:identifier="g_i_marshalling_tests__overrides_struct_return">
+      <return-value transfer-ownership="full">
+        <type name="OverridesStruct"
+              c:type="GIMarshallingTestsOverridesStruct*"/>
+      </return-value>
+    </function>
+    <function name="pointer_in_return"
+              c:identifier="g_i_marshalling_tests_pointer_in_return">
+      <return-value transfer-ownership="none">
+        <type name="any" c:type="gpointer"/>
+      </return-value>
+      <parameters>
+        <parameter name="pointer" transfer-ownership="none">
+          <type name="any" c:type="gpointer"/>
+        </parameter>
+      </parameters>
+    </function>
+    <function name="pointer_struct_in"
+              c:identifier="g_i_marshalling_tests__pointer_struct_in">
+      <return-value transfer-ownership="none">
+        <type name="none" c:type="void"/>
+      </return-value>
+      <parameters>
+        <parameter name="struct_" transfer-ownership="none">
+          <type name="PointerStruct"
+                c:type="GIMarshallingTestsPointerStruct*"/>
+        </parameter>
+      </parameters>
+    </function>
+    <function name="pointer_struct_inout"
+              c:identifier="g_i_marshalling_tests__pointer_struct_inout">
+      <return-value transfer-ownership="none">
+        <type name="none" c:type="void"/>
+      </return-value>
+      <parameters>
+        <parameter name="struct_"
+                   direction="inout"
+                   caller-allocates="0"
+                   transfer-ownership="none">
+          <type name="PointerStruct"
+                c:type="GIMarshallingTestsPointerStruct**"/>
+        </parameter>
+      </parameters>
+    </function>
+    <function name="pointer_struct_out"
+              c:identifier="g_i_marshalling_tests__pointer_struct_out">
+      <return-value transfer-ownership="none">
+        <type name="none" c:type="void"/>
+      </return-value>
+      <parameters>
+        <parameter name="struct_"
+                   direction="out"
+                   caller-allocates="0"
+                   transfer-ownership="none">
+          <type name="PointerStruct"
+                c:type="GIMarshallingTestsPointerStruct**"/>
+        </parameter>
+      </parameters>
+    </function>
+    <function name="pointer_struct_return"
+              c:identifier="g_i_marshalling_tests__pointer_struct_return">
+      <return-value transfer-ownership="none">
+        <type name="PointerStruct" c:type="GIMarshallingTestsPointerStruct*"/>
+      </return-value>
+    </function>
+    <function name="short_in_max"
+              c:identifier="g_i_marshalling_tests_short_in_max">
+      <return-value transfer-ownership="none">
+        <type name="none" c:type="void"/>
+      </return-value>
+      <parameters>
+        <parameter name="short_" transfer-ownership="none">
+          <type name="short" c:type="gshort"/>
+        </parameter>
+      </parameters>
+    </function>
+    <function name="short_in_min"
+              c:identifier="g_i_marshalling_tests_short_in_min">
+      <return-value transfer-ownership="none">
+        <type name="none" c:type="void"/>
+      </return-value>
+      <parameters>
+        <parameter name="short_" transfer-ownership="none">
+          <type name="short" c:type="gshort"/>
+        </parameter>
+      </parameters>
+    </function>
+    <function name="short_inout_max_min"
+              c:identifier="g_i_marshalling_tests_short_inout_max_min">
+      <return-value transfer-ownership="none">
+        <type name="none" c:type="void"/>
+      </return-value>
+      <parameters>
+        <parameter name="short_"
+                   direction="inout"
+                   caller-allocates="0"
+                   transfer-ownership="full">
+          <type name="short" c:type="gshort*"/>
+        </parameter>
+      </parameters>
+    </function>
+    <function name="short_inout_min_max"
+              c:identifier="g_i_marshalling_tests_short_inout_min_max">
+      <return-value transfer-ownership="none">
+        <type name="none" c:type="void"/>
+      </return-value>
+      <parameters>
+        <parameter name="short_"
+                   direction="inout"
+                   caller-allocates="0"
+                   transfer-ownership="full">
+          <type name="short" c:type="gshort*"/>
+        </parameter>
+      </parameters>
+    </function>
+    <function name="short_out_max"
+              c:identifier="g_i_marshalling_tests_short_out_max">
+      <return-value transfer-ownership="none">
+        <type name="none" c:type="void"/>
+      </return-value>
+      <parameters>
+        <parameter name="short_"
+                   direction="out"
+                   caller-allocates="0"
+                   transfer-ownership="full">
+          <type name="short" c:type="gshort*"/>
+        </parameter>
+      </parameters>
+    </function>
+    <function name="short_out_min"
+              c:identifier="g_i_marshalling_tests_short_out_min">
+      <return-value transfer-ownership="none">
+        <type name="none" c:type="void"/>
+      </return-value>
+      <parameters>
+        <parameter name="short_"
+                   direction="out"
+                   caller-allocates="0"
+                   transfer-ownership="full">
+          <type name="short" c:type="gshort*"/>
+        </parameter>
+      </parameters>
+    </function>
+    <function name="short_return_max"
+              c:identifier="g_i_marshalling_tests_short_return_max">
+      <return-value transfer-ownership="none">
+        <type name="short" c:type="gshort"/>
+      </return-value>
+    </function>
+    <function name="short_return_min"
+              c:identifier="g_i_marshalling_tests_short_return_min">
+      <return-value transfer-ownership="none">
+        <type name="short" c:type="gshort"/>
+      </return-value>
+    </function>
+    <function name="simple_struct_in"
+              c:identifier="g_i_marshalling_tests__simple_struct_in">
+      <return-value transfer-ownership="none">
+        <type name="none" c:type="void"/>
+      </return-value>
+      <parameters>
+        <parameter name="struct_" transfer-ownership="none">
+          <type name="SimpleStruct" c:type="GIMarshallingTestsSimpleStruct*"/>
+        </parameter>
+      </parameters>
+    </function>
+    <function name="simple_struct_inout"
+              c:identifier="g_i_marshalling_tests__simple_struct_inout">
+      <return-value transfer-ownership="none">
+        <type name="none" c:type="void"/>
+      </return-value>
+      <parameters>
+        <parameter name="struct_"
+                   direction="inout"
+                   caller-allocates="0"
+                   transfer-ownership="none">
+          <type name="SimpleStruct" c:type="GIMarshallingTestsSimpleStruct**"/>
+        </parameter>
+      </parameters>
+    </function>
+    <function name="simple_struct_out"
+              c:identifier="g_i_marshalling_tests__simple_struct_out">
+      <return-value transfer-ownership="none">
+        <type name="none" c:type="void"/>
+      </return-value>
+      <parameters>
+        <parameter name="struct_"
+                   direction="out"
+                   caller-allocates="0"
+                   transfer-ownership="none">
+          <type name="SimpleStruct" c:type="GIMarshallingTestsSimpleStruct**"/>
+        </parameter>
+      </parameters>
+    </function>
+    <function name="simple_struct_return"
+              c:identifier="g_i_marshalling_tests__simple_struct_return">
+      <return-value transfer-ownership="none">
+        <type name="SimpleStruct" c:type="GIMarshallingTestsSimpleStruct*"/>
+      </return-value>
+    </function>
+    <function name="size_in" c:identifier="g_i_marshalling_tests_size_in">
+      <return-value transfer-ownership="none">
+        <type name="none" c:type="void"/>
+      </return-value>
+      <parameters>
+        <parameter name="size" transfer-ownership="none">
+          <type name="gsize" c:type="gsize"/>
+        </parameter>
+      </parameters>
+    </function>
+    <function name="size_inout"
+              c:identifier="g_i_marshalling_tests_size_inout">
+      <return-value transfer-ownership="none">
+        <type name="none" c:type="void"/>
+      </return-value>
+      <parameters>
+        <parameter name="size"
+                   direction="inout"
+                   caller-allocates="0"
+                   transfer-ownership="full">
+          <type name="gsize" c:type="gsize*"/>
+        </parameter>
+      </parameters>
+    </function>
+    <function name="size_out" c:identifier="g_i_marshalling_tests_size_out">
+      <return-value transfer-ownership="none">
+        <type name="none" c:type="void"/>
+      </return-value>
+      <parameters>
+        <parameter name="size"
+                   direction="out"
+                   caller-allocates="0"
+                   transfer-ownership="full">
+          <type name="gsize" c:type="gsize*"/>
+        </parameter>
+      </parameters>
+    </function>
+    <function name="size_return"
+              c:identifier="g_i_marshalling_tests_size_return">
+      <return-value transfer-ownership="none">
+        <type name="gsize" c:type="gsize"/>
+      </return-value>
+    </function>
+    <function name="ssize_in_max"
+              c:identifier="g_i_marshalling_tests_ssize_in_max">
+      <return-value transfer-ownership="none">
+        <type name="none" c:type="void"/>
+      </return-value>
+      <parameters>
+        <parameter name="ssize" transfer-ownership="none">
+          <type name="gssize" c:type="gssize"/>
+        </parameter>
+      </parameters>
+    </function>
+    <function name="ssize_in_min"
+              c:identifier="g_i_marshalling_tests_ssize_in_min">
+      <return-value transfer-ownership="none">
+        <type name="none" c:type="void"/>
+      </return-value>
+      <parameters>
+        <parameter name="ssize" transfer-ownership="none">
+          <type name="gssize" c:type="gssize"/>
+        </parameter>
+      </parameters>
+    </function>
+    <function name="ssize_inout_max_min"
+              c:identifier="g_i_marshalling_tests_ssize_inout_max_min">
+      <return-value transfer-ownership="none">
+        <type name="none" c:type="void"/>
+      </return-value>
+      <parameters>
+        <parameter name="ssize"
+                   direction="inout"
+                   caller-allocates="0"
+                   transfer-ownership="full">
+          <type name="gssize" c:type="gssize*"/>
+        </parameter>
+      </parameters>
+    </function>
+    <function name="ssize_inout_min_max"
+              c:identifier="g_i_marshalling_tests_ssize_inout_min_max">
+      <return-value transfer-ownership="none">
+        <type name="none" c:type="void"/>
+      </return-value>
+      <parameters>
+        <parameter name="ssize"
+                   direction="inout"
+                   caller-allocates="0"
+                   transfer-ownership="full">
+          <type name="gssize" c:type="gssize*"/>
+        </parameter>
+      </parameters>
+    </function>
+    <function name="ssize_out_max"
+              c:identifier="g_i_marshalling_tests_ssize_out_max">
+      <return-value transfer-ownership="none">
+        <type name="none" c:type="void"/>
+      </return-value>
+      <parameters>
+        <parameter name="ssize"
+                   direction="out"
+                   caller-allocates="0"
+                   transfer-ownership="full">
+          <type name="gssize" c:type="gssize*"/>
+        </parameter>
+      </parameters>
+    </function>
+    <function name="ssize_out_min"
+              c:identifier="g_i_marshalling_tests_ssize_out_min">
+      <return-value transfer-ownership="none">
+        <type name="none" c:type="void"/>
+      </return-value>
+      <parameters>
+        <parameter name="ssize"
+                   direction="out"
+                   caller-allocates="0"
+                   transfer-ownership="full">
+          <type name="gssize" c:type="gssize*"/>
+        </parameter>
+      </parameters>
+    </function>
+    <function name="ssize_return_max"
+              c:identifier="g_i_marshalling_tests_ssize_return_max">
+      <return-value transfer-ownership="none">
+        <type name="gssize" c:type="gssize"/>
+      </return-value>
+    </function>
+    <function name="ssize_return_min"
+              c:identifier="g_i_marshalling_tests_ssize_return_min">
+      <return-value transfer-ownership="none">
+        <type name="gssize" c:type="gssize"/>
+      </return-value>
+    </function>
+    <function name="test_interface_test_int8_in"
+              c:identifier="g_i_marshalling_tests_test_interface_test_int8_in">
+      <return-value transfer-ownership="none">
+        <type name="none" c:type="void"/>
+      </return-value>
+      <parameters>
+        <parameter name="test_iface" transfer-ownership="none">
+          <type name="Interface" c:type="GIMarshallingTestsInterface*"/>
+        </parameter>
+        <parameter name="in" transfer-ownership="none">
+          <type name="int8" c:type="gint8"/>
+        </parameter>
+      </parameters>
+    </function>
+    <function name="time_t_in" c:identifier="g_i_marshalling_tests_time_t_in">
+      <return-value transfer-ownership="none">
+        <type name="none" c:type="void"/>
+      </return-value>
+      <parameters>
+        <parameter name="time_t_" transfer-ownership="none">
+          <type name="long" c:type="time_t"/>
+        </parameter>
+      </parameters>
+    </function>
+    <function name="time_t_inout"
+              c:identifier="g_i_marshalling_tests_time_t_inout">
+      <return-value transfer-ownership="none">
+        <type name="none" c:type="void"/>
+      </return-value>
+      <parameters>
+        <parameter name="time_t_"
+                   direction="inout"
+                   caller-allocates="0"
+                   transfer-ownership="full">
+          <type name="long" c:type="time_t*"/>
+        </parameter>
+      </parameters>
+    </function>
+    <function name="time_t_out"
+              c:identifier="g_i_marshalling_tests_time_t_out">
+      <return-value transfer-ownership="none">
+        <type name="none" c:type="void"/>
+      </return-value>
+      <parameters>
+        <parameter name="time_t_"
+                   direction="out"
+                   caller-allocates="0"
+                   transfer-ownership="full">
+          <type name="long" c:type="time_t*"/>
+        </parameter>
+      </parameters>
+    </function>
+    <function name="time_t_return"
+              c:identifier="g_i_marshalling_tests_time_t_return">
+      <return-value transfer-ownership="none">
+        <type name="long" c:type="time_t"/>
+      </return-value>
+    </function>
+    <function name="uint16_in" c:identifier="g_i_marshalling_tests_uint16_in">
+      <return-value transfer-ownership="none">
+        <type name="none" c:type="void"/>
+      </return-value>
+      <parameters>
+        <parameter name="uint16" transfer-ownership="none">
+          <type name="uint16" c:type="guint16"/>
+        </parameter>
+      </parameters>
+    </function>
+    <function name="uint16_inout"
+              c:identifier="g_i_marshalling_tests_uint16_inout">
+      <return-value transfer-ownership="none">
+        <type name="none" c:type="void"/>
+      </return-value>
+      <parameters>
+        <parameter name="uint16"
+                   direction="inout"
+                   caller-allocates="0"
+                   transfer-ownership="full">
+          <type name="uint16" c:type="guint16*"/>
+        </parameter>
+      </parameters>
+    </function>
+    <function name="uint16_out"
+              c:identifier="g_i_marshalling_tests_uint16_out">
+      <return-value transfer-ownership="none">
+        <type name="none" c:type="void"/>
+      </return-value>
+      <parameters>
+        <parameter name="uint16"
+                   direction="out"
+                   caller-allocates="0"
+                   transfer-ownership="full">
+          <type name="uint16" c:type="guint16*"/>
+        </parameter>
+      </parameters>
+    </function>
+    <function name="uint16_return"
+              c:identifier="g_i_marshalling_tests_uint16_return">
+      <return-value transfer-ownership="none">
+        <type name="uint16" c:type="guint16"/>
+      </return-value>
+    </function>
+    <function name="uint32_in" c:identifier="g_i_marshalling_tests_uint32_in">
+      <return-value transfer-ownership="none">
+        <type name="none" c:type="void"/>
+      </return-value>
+      <parameters>
+        <parameter name="uint32" transfer-ownership="none">
+          <type name="uint32" c:type="guint32"/>
+        </parameter>
+      </parameters>
+    </function>
+    <function name="uint32_inout"
+              c:identifier="g_i_marshalling_tests_uint32_inout">
+      <return-value transfer-ownership="none">
+        <type name="none" c:type="void"/>
+      </return-value>
+      <parameters>
+        <parameter name="uint32"
+                   direction="inout"
+                   caller-allocates="0"
+                   transfer-ownership="full">
+          <type name="uint32" c:type="guint32*"/>
+        </parameter>
+      </parameters>
+    </function>
+    <function name="uint32_out"
+              c:identifier="g_i_marshalling_tests_uint32_out">
+      <return-value transfer-ownership="none">
+        <type name="none" c:type="void"/>
+      </return-value>
+      <parameters>
+        <parameter name="uint32"
+                   direction="out"
+                   caller-allocates="0"
+                   transfer-ownership="full">
+          <type name="uint32" c:type="guint32*"/>
+        </parameter>
+      </parameters>
+    </function>
+    <function name="uint32_return"
+              c:identifier="g_i_marshalling_tests_uint32_return">
+      <return-value transfer-ownership="none">
+        <type name="uint32" c:type="guint32"/>
+      </return-value>
+    </function>
+    <function name="uint64_in" c:identifier="g_i_marshalling_tests_uint64_in">
+      <return-value transfer-ownership="none">
+        <type name="none" c:type="void"/>
+      </return-value>
+      <parameters>
+        <parameter name="uint64" transfer-ownership="none">
+          <type name="uint64" c:type="guint64"/>
+        </parameter>
+      </parameters>
+    </function>
+    <function name="uint64_inout"
+              c:identifier="g_i_marshalling_tests_uint64_inout">
+      <return-value transfer-ownership="none">
+        <type name="none" c:type="void"/>
+      </return-value>
+      <parameters>
+        <parameter name="uint64"
+                   direction="inout"
+                   caller-allocates="0"
+                   transfer-ownership="full">
+          <type name="uint64" c:type="guint64*"/>
+        </parameter>
+      </parameters>
+    </function>
+    <function name="uint64_out"
+              c:identifier="g_i_marshalling_tests_uint64_out">
+      <return-value transfer-ownership="none">
+        <type name="none" c:type="void"/>
+      </return-value>
+      <parameters>
+        <parameter name="uint64"
+                   direction="out"
+                   caller-allocates="0"
+                   transfer-ownership="full">
+          <type name="uint64" c:type="guint64*"/>
+        </parameter>
+      </parameters>
+    </function>
+    <function name="uint64_return"
+              c:identifier="g_i_marshalling_tests_uint64_return">
+      <return-value transfer-ownership="none">
+        <type name="uint64" c:type="guint64"/>
+      </return-value>
+    </function>
+    <function name="uint8_in" c:identifier="g_i_marshalling_tests_uint8_in">
+      <return-value transfer-ownership="none">
+        <type name="none" c:type="void"/>
+      </return-value>
+      <parameters>
+        <parameter name="uint8" transfer-ownership="none">
+          <type name="uint8" c:type="guint8"/>
+        </parameter>
+      </parameters>
+    </function>
+    <function name="uint8_inout"
+              c:identifier="g_i_marshalling_tests_uint8_inout">
+      <return-value transfer-ownership="none">
+        <type name="none" c:type="void"/>
+      </return-value>
+      <parameters>
+        <parameter name="uint8"
+                   direction="inout"
+                   caller-allocates="0"
+                   transfer-ownership="full">
+          <type name="uint8" c:type="guint8*"/>
+        </parameter>
+      </parameters>
+    </function>
+    <function name="uint8_out" c:identifier="g_i_marshalling_tests_uint8_out">
+      <return-value transfer-ownership="none">
+        <type name="none" c:type="void"/>
+      </return-value>
+      <parameters>
+        <parameter name="uint8"
+                   direction="out"
+                   caller-allocates="0"
+                   transfer-ownership="full">
+          <type name="uint8" c:type="guint8*"/>
+        </parameter>
+      </parameters>
+    </function>
+    <function name="uint8_return"
+              c:identifier="g_i_marshalling_tests_uint8_return">
+      <return-value transfer-ownership="none">
+        <type name="uint8" c:type="guint8"/>
+      </return-value>
+    </function>
+    <function name="uint_in" c:identifier="g_i_marshalling_tests_uint_in">
+      <return-value transfer-ownership="none">
+        <type name="none" c:type="void"/>
+      </return-value>
+      <parameters>
+        <parameter name="uint_" transfer-ownership="none">
+          <type name="uint" c:type="guint"/>
+        </parameter>
+      </parameters>
+    </function>
+    <function name="uint_inout"
+              c:identifier="g_i_marshalling_tests_uint_inout">
+      <return-value transfer-ownership="none">
+        <type name="none" c:type="void"/>
+      </return-value>
+      <parameters>
+        <parameter name="uint_"
+                   direction="inout"
+                   caller-allocates="0"
+                   transfer-ownership="full">
+          <type name="uint" c:type="guint*"/>
+        </parameter>
+      </parameters>
+    </function>
+    <function name="uint_out" c:identifier="g_i_marshalling_tests_uint_out">
+      <return-value transfer-ownership="none">
+        <type name="none" c:type="void"/>
+      </return-value>
+      <parameters>
+        <parameter name="uint_"
+                   direction="out"
+                   caller-allocates="0"
+                   transfer-ownership="full">
+          <type name="uint" c:type="guint*"/>
+        </parameter>
+      </parameters>
+    </function>
+    <function name="uint_return"
+              c:identifier="g_i_marshalling_tests_uint_return">
+      <return-value transfer-ownership="none">
+        <type name="uint" c:type="guint"/>
+      </return-value>
+    </function>
+    <function name="ulong_in" c:identifier="g_i_marshalling_tests_ulong_in">
+      <return-value transfer-ownership="none">
+        <type name="none" c:type="void"/>
+      </return-value>
+      <parameters>
+        <parameter name="ulong_" transfer-ownership="none">
+          <type name="ulong" c:type="gulong"/>
+        </parameter>
+      </parameters>
+    </function>
+    <function name="ulong_inout"
+              c:identifier="g_i_marshalling_tests_ulong_inout">
+      <return-value transfer-ownership="none">
+        <type name="none" c:type="void"/>
+      </return-value>
+      <parameters>
+        <parameter name="ulong_"
+                   direction="inout"
+                   caller-allocates="0"
+                   transfer-ownership="full">
+          <type name="ulong" c:type="gulong*"/>
+        </parameter>
+      </parameters>
+    </function>
+    <function name="ulong_out" c:identifier="g_i_marshalling_tests_ulong_out">
+      <return-value transfer-ownership="none">
+        <type name="none" c:type="void"/>
+      </return-value>
+      <parameters>
+        <parameter name="ulong_"
+                   direction="out"
+                   caller-allocates="0"
+                   transfer-ownership="full">
+          <type name="ulong" c:type="gulong*"/>
+        </parameter>
+      </parameters>
+    </function>
+    <function name="ulong_return"
+              c:identifier="g_i_marshalling_tests_ulong_return">
+      <return-value transfer-ownership="none">
+        <type name="ulong" c:type="gulong"/>
+      </return-value>
+    </function>
+    <function name="union_in" c:identifier="g_i_marshalling_tests__union_in">
+      <return-value transfer-ownership="none">
+        <type name="none" c:type="void"/>
+      </return-value>
+      <parameters>
+        <parameter name="union_" transfer-ownership="none">
+          <type name="Union" c:type="GIMarshallingTestsUnion*"/>
+        </parameter>
+      </parameters>
+    </function>
+    <function name="union_inout"
+              c:identifier="g_i_marshalling_tests__union_inout">
+      <return-value transfer-ownership="none">
+        <type name="none" c:type="void"/>
+      </return-value>
+      <parameters>
+        <parameter name="union_"
+                   direction="inout"
+                   caller-allocates="0"
+                   transfer-ownership="none">
+          <type name="Union" c:type="GIMarshallingTestsUnion**"/>
+        </parameter>
+      </parameters>
+    </function>
+    <function name="union_out" c:identifier="g_i_marshalling_tests__union_out">
+      <return-value transfer-ownership="none">
+        <type name="none" c:type="void"/>
+      </return-value>
+      <parameters>
+        <parameter name="union_"
+                   direction="out"
+                   caller-allocates="0"
+                   transfer-ownership="none">
+          <type name="Union" c:type="GIMarshallingTestsUnion**"/>
+        </parameter>
+      </parameters>
+    </function>
+    <function name="union_return"
+              c:identifier="g_i_marshalling_tests__union_return">
+      <return-value transfer-ownership="none">
+        <type name="Union" c:type="GIMarshallingTestsUnion*"/>
+      </return-value>
+    </function>
+    <function name="ushort_in" c:identifier="g_i_marshalling_tests_ushort_in">
+      <return-value transfer-ownership="none">
+        <type name="none" c:type="void"/>
+      </return-value>
+      <parameters>
+        <parameter name="ushort_" transfer-ownership="none">
+          <type name="ushort" c:type="gushort"/>
+        </parameter>
+      </parameters>
+    </function>
+    <function name="ushort_inout"
+              c:identifier="g_i_marshalling_tests_ushort_inout">
+      <return-value transfer-ownership="none">
+        <type name="none" c:type="void"/>
+      </return-value>
+      <parameters>
+        <parameter name="ushort_"
+                   direction="inout"
+                   caller-allocates="0"
+                   transfer-ownership="full">
+          <type name="ushort" c:type="gushort*"/>
+        </parameter>
+      </parameters>
+    </function>
+    <function name="ushort_out"
+              c:identifier="g_i_marshalling_tests_ushort_out">
+      <return-value transfer-ownership="none">
+        <type name="none" c:type="void"/>
+      </return-value>
+      <parameters>
+        <parameter name="ushort_"
+                   direction="out"
+                   caller-allocates="0"
+                   transfer-ownership="full">
+          <type name="ushort" c:type="gushort*"/>
+        </parameter>
+      </parameters>
+    </function>
+    <function name="ushort_return"
+              c:identifier="g_i_marshalling_tests_ushort_return">
+      <return-value transfer-ownership="none">
+        <type name="ushort" c:type="gushort"/>
+      </return-value>
+    </function>
+    <function name="utf8_dangling_out"
+              c:identifier="g_i_marshalling_tests_utf8_dangling_out">
+      <return-value transfer-ownership="none">
+        <type name="none" c:type="void"/>
+      </return-value>
+      <parameters>
+        <parameter name="utf8"
+                   direction="out"
+                   caller-allocates="0"
+                   transfer-ownership="full">
+          <type name="utf8" c:type="gchar**"/>
+        </parameter>
+      </parameters>
+    </function>
+    <function name="utf8_full_in"
+              c:identifier="g_i_marshalling_tests_utf8_full_in">
+      <return-value transfer-ownership="none">
+        <type name="none" c:type="void"/>
+      </return-value>
+      <parameters>
+        <parameter name="utf8" transfer-ownership="full">
+          <type name="utf8" c:type="gchar*"/>
+        </parameter>
+      </parameters>
+    </function>
+    <function name="utf8_full_inout"
+              c:identifier="g_i_marshalling_tests_utf8_full_inout">
+      <return-value transfer-ownership="none">
+        <type name="none" c:type="void"/>
+      </return-value>
+      <parameters>
+        <parameter name="utf8"
+                   direction="inout"
+                   caller-allocates="0"
+                   transfer-ownership="full">
+          <type name="utf8" c:type="gchar**"/>
+        </parameter>
+      </parameters>
+    </function>
+    <function name="utf8_full_out"
+              c:identifier="g_i_marshalling_tests_utf8_full_out">
+      <return-value transfer-ownership="none">
+        <type name="none" c:type="void"/>
+      </return-value>
+      <parameters>
+        <parameter name="utf8"
+                   direction="out"
+                   caller-allocates="0"
+                   transfer-ownership="full">
+          <type name="utf8" c:type="gchar**"/>
+        </parameter>
+      </parameters>
+    </function>
+    <function name="utf8_full_out_out"
+              c:identifier="g_i_marshalling_tests_utf8_full_out_out">
+      <return-value transfer-ownership="none">
+        <type name="none" c:type="void"/>
+      </return-value>
+      <parameters>
+        <parameter name="utf80" transfer-ownership="none">
+          <array c:type="gchar**">
+            <type name="utf8"/>
+          </array>
+        </parameter>
+        <parameter name="utf82" transfer-ownership="none">
+          <array c:type="gchar**">
+            <type name="utf8"/>
+          </array>
+        </parameter>
+      </parameters>
+    </function>
+    <function name="utf8_full_return"
+              c:identifier="g_i_marshalling_tests_utf8_full_return">
+      <return-value transfer-ownership="full">
+        <type name="utf8" c:type="gchar*"/>
+      </return-value>
+    </function>
+    <function name="utf8_none_in"
+              c:identifier="g_i_marshalling_tests_utf8_none_in">
+      <return-value transfer-ownership="none">
+        <type name="none" c:type="void"/>
+      </return-value>
+      <parameters>
+        <parameter name="utf8" transfer-ownership="none">
+          <type name="utf8" c:type="gchar*"/>
+        </parameter>
+      </parameters>
+    </function>
+    <function name="utf8_none_inout"
+              c:identifier="g_i_marshalling_tests_utf8_none_inout">
+      <return-value transfer-ownership="none">
+        <type name="none" c:type="void"/>
+      </return-value>
+      <parameters>
+        <parameter name="utf8"
+                   direction="inout"
+                   caller-allocates="0"
+                   transfer-ownership="none">
+          <type name="utf8" c:type="gchar**"/>
+        </parameter>
+      </parameters>
+    </function>
+    <function name="utf8_none_out"
+              c:identifier="g_i_marshalling_tests_utf8_none_out">
+      <return-value transfer-ownership="none">
+        <type name="none" c:type="void"/>
+      </return-value>
+      <parameters>
+        <parameter name="utf8"
+                   direction="out"
+                   caller-allocates="0"
+                   transfer-ownership="none">
+          <type name="utf8" c:type="gchar**"/>
+        </parameter>
+      </parameters>
+    </function>
+    <function name="utf8_none_return"
+              c:identifier="g_i_marshalling_tests_utf8_none_return">
+      <return-value transfer-ownership="none">
+        <type name="utf8" c:type="gchar*"/>
+      </return-value>
+    </function>
+  </namespace>
+</repository>
diff --git a/basis/gobject-introspection/tests/g-i-marshalling-tests/ffi/ffi.factor b/basis/gobject-introspection/tests/g-i-marshalling-tests/ffi/ffi.factor
new file mode 100644 (file)
index 0000000..3bf08bd
--- /dev/null
@@ -0,0 +1,19 @@
+! Copyright (C) 2010 Anton Gorenko.
+! See http://factorcode.org/license.txt for BSD license.
+USING: alien alien.c-types alien.libraries combinators kernel
+system
+gobject-introspection glib.ffi gobject.ffi ;
+IN: gobject-introspection.tests.g-i-marshalling-tests.ffi
+
+<<
+"gobject-introspection.tests.g-i-marshalling-tests" {
+    { [ os winnt? ] [ drop ] }
+    { [ os macosx? ] [ drop ] }
+    { [ os unix? ] [ "libgirepository-gimarshallingtests-1.0.so" cdecl add-library ] }
+} cond
+>>
+
+IMPLEMENT-STRUCTS: GIMarshallingTestsSimpleStruct ;
+
+GIR: vocab:gobject-introspection/tests/g-i-marshalling-tests/GIMarshallingTests-1.0.gir
+
diff --git a/basis/gobject-introspection/tests/g-i-marshalling-tests/g-i-marshalling-tests.factor b/basis/gobject-introspection/tests/g-i-marshalling-tests/g-i-marshalling-tests.factor
new file mode 100644 (file)
index 0000000..bde6d26
--- /dev/null
@@ -0,0 +1,5 @@
+! Copyright (C) 2010 Anton Gorenko.
+! See http://factorcode.org/license.txt for BSD license.
+USING: gobject-introspection.tests.g-i-marshalling-tests.ffi ;
+IN: gobject-introspection.tests.g-i-marshalling-tests
+
diff --git a/basis/gobject-introspection/tests/marshalling.factor b/basis/gobject-introspection/tests/marshalling.factor
new file mode 100644 (file)
index 0000000..eecf21a
--- /dev/null
@@ -0,0 +1,295 @@
+! Copyright (C) 2010 Anton Gorenko.
+! See http://factorcode.org/license.txt for BSD license.
+USING: accessors alien.c-types alien.data alien.strings
+alien.syntax arrays classes.struct destructors 
+gobject-introspection.tests.g-i-marshalling-tests.ffi
+glib.ffi gobject.ffi io.encodings.utf8 kernel literals
+sequences specialized-arrays tools.test ;
+IN: gobject-introspection.tests.marshalling
+
+SPECIALIZED-ARRAYS: gint gshort void*
+GIMarshallingTestsSimpleStruct ;
+
+CONSTANT: G_I_MARSHALLING_TESTS_CONSTANT_NUMBER 42
+
+CONSTANT: G_I_MARSHALLING_TESTS_CONSTANT_UTF8 "const ♥ utf8"
+
+! gboolean
+
+[ t ] [ g_i_marshalling_tests_boolean_return_true ] unit-test
+[ f ] [ g_i_marshalling_tests_boolean_return_false ] unit-test
+
+: boolean-out-true ( -- out )
+    { gboolean } [ g_i_marshalling_tests_boolean_out_true ]
+    with-out-parameters ;
+[ t ] [ boolean-out-true ] unit-test
+
+: boolean-out-false ( -- out )
+    { gboolean } [ g_i_marshalling_tests_boolean_out_false ]
+    with-out-parameters ;
+[ f ] [ boolean-out-false ] unit-test
+
+! gint8
+
+[ $ G_MAXINT8 ] [ g_i_marshalling_tests_int8_return_max ] unit-test
+[ $ G_MININT8 ] [ g_i_marshalling_tests_int8_return_min ] unit-test
+
+: int8-out-max ( -- out )
+    { gint8 } [ g_i_marshalling_tests_int8_out_max ]
+    with-out-parameters ;
+[ $ G_MAXINT8 ] [ int8-out-max ] unit-test
+
+: int8-out-min ( -- out )
+    { gint8 } [ g_i_marshalling_tests_int8_out_min ]
+    with-out-parameters ;
+[ $ G_MININT8 ] [ int8-out-min ] unit-test
+
+: int8-inout-max-min ( -- out )
+    { { gint8 initial: $ G_MAXINT8 } }
+    [ g_i_marshalling_tests_int8_inout_max_min ]
+    with-out-parameters ;
+[ $ G_MININT8 ] [ int8-inout-max-min ] unit-test
+
+! guint8
+
+[ $ G_MAXUINT8 ] [ g_i_marshalling_tests_uint8_return ] unit-test
+
+: uint8-out ( -- out )
+    { guint8 } [ g_i_marshalling_tests_uint8_out ]
+    with-out-parameters ;
+[ $ G_MAXUINT8 ] [ uint8-out ] unit-test
+
+: uint8-inout ( -- out )
+    { { guint8 initial: $ G_MAXUINT8 } }
+    [ g_i_marshalling_tests_uint8_inout ]
+    with-out-parameters ;
+[ 0 ] [ uint8-inout ] unit-test
+
+! gint16
+
+[ $ G_MAXINT16 ] [ g_i_marshalling_tests_int16_return_max ] unit-test
+[ $ G_MININT16 ] [ g_i_marshalling_tests_int16_return_min ] unit-test
+
+: int16-out-max ( -- out )
+    { gint16 } [ g_i_marshalling_tests_int16_out_max ]
+    with-out-parameters ;
+[ $ G_MAXINT16 ] [ int16-out-max ] unit-test
+
+: int16-out-min ( -- out )
+    { gint16 } [ g_i_marshalling_tests_int16_out_min ]
+    with-out-parameters ;
+[ $ G_MININT16 ] [ int16-out-min ] unit-test
+
+: int16-inout-max-min ( -- out )
+    { { gint16 initial: $ G_MAXINT16 } }
+    [ g_i_marshalling_tests_int16_inout_max_min ]
+    with-out-parameters ;
+[ $ G_MININT16 ] [ int16-inout-max-min ] unit-test
+
+! guint16
+
+[ $ G_MAXUINT16 ] [ g_i_marshalling_tests_uint16_return ] unit-test
+
+: uint16-out ( -- out )
+    { guint16 } [ g_i_marshalling_tests_uint16_out ]
+    with-out-parameters ;
+[ $ G_MAXUINT16 ] [ uint16-out ] unit-test
+
+: uint16-inout ( -- out )
+    { { guint16 initial: $ G_MAXUINT16 } }
+    [ g_i_marshalling_tests_uint16_inout ]
+    with-out-parameters ;
+[ 0 ] [ uint16-inout ] unit-test
+
+! gint32
+
+[ $ G_MAXINT32 ] [ g_i_marshalling_tests_int32_return_max ] unit-test
+[ $ G_MININT32 ] [ g_i_marshalling_tests_int32_return_min ] unit-test
+
+: int32-out-max ( -- out )
+    { gint32 } [ g_i_marshalling_tests_int32_out_max ]
+    with-out-parameters ;
+[ $ G_MAXINT32 ] [ int32-out-max ] unit-test
+
+: int32-out-min ( -- out )
+    { gint32 } [ g_i_marshalling_tests_int32_out_min ]
+    with-out-parameters ;
+[ $ G_MININT32 ] [ int32-out-min ] unit-test
+
+: int32-inout-max-min ( -- out )
+    { { gint32 initial: $ G_MAXINT32 } }
+    [ g_i_marshalling_tests_int32_inout_max_min ]
+    with-out-parameters ;
+[ $ G_MININT32 ] [ int32-inout-max-min ] unit-test
+
+! guint32
+
+[ $ G_MAXUINT32 ] [ g_i_marshalling_tests_uint32_return ] unit-test
+
+: uint32-out ( -- out )
+    { guint32 } [ g_i_marshalling_tests_uint32_out ]
+    with-out-parameters ;
+[ $ G_MAXUINT32 ] [ uint32-out ] unit-test
+
+: uint32-inout ( -- out )
+    { { guint32 initial: $ G_MAXUINT32 } }
+    [ g_i_marshalling_tests_uint32_inout ]
+    with-out-parameters ;
+[ 0 ] [ uint32-inout ] unit-test
+
+! gint64
+
+[ $ G_MAXINT64 ] [ g_i_marshalling_tests_int64_return_max ] unit-test
+[ $ G_MININT64 ] [ g_i_marshalling_tests_int64_return_min ] unit-test
+
+: int64-out-max ( -- out )
+    { gint64 } [ g_i_marshalling_tests_int64_out_max ]
+    with-out-parameters ;
+[ $ G_MAXINT64 ] [ int64-out-max ] unit-test
+
+: int64-out-min ( -- out )
+    { gint64 } [ g_i_marshalling_tests_int64_out_min ]
+    with-out-parameters ;
+[ $ G_MININT64 ] [ int64-out-min ] unit-test
+
+: int64-inout-max-min ( -- out )
+    { { gint64 initial: $ G_MAXINT64 } }
+    [ g_i_marshalling_tests_int64_inout_max_min ]
+    with-out-parameters ;
+[ $ G_MININT64 ] [ int64-inout-max-min ] unit-test
+
+! guint64
+
+[ $ G_MAXUINT64 ] [ g_i_marshalling_tests_uint64_return ] unit-test
+
+: uint64-out ( -- out )
+    { guint64 } [ g_i_marshalling_tests_uint64_out ]
+    with-out-parameters ;
+[ $ G_MAXUINT64 ] [ uint64-out ] unit-test
+
+: uint64-inout ( -- out )
+    { { guint64 initial: $ G_MAXUINT64 } }
+    [ g_i_marshalling_tests_uint64_inout ]
+    with-out-parameters ;
+[ 0 ] [ uint64-inout ] unit-test
+
+! gssize
+! gsize
+! gfloat
+! gdouble
+! time_t
+
+! gtype
+
+[ $ G_TYPE_NONE ]
+[ g_i_marshalling_tests_gtype_return ] unit-test
+
+: gtype-out ( -- out )
+    { GType } [ g_i_marshalling_tests_gtype_out ]
+    with-out-parameters ;
+[ $ G_TYPE_NONE ] [ gtype-out ] unit-test
+
+: gtype-inout ( -- out )
+    { { GType initial: $ G_TYPE_NONE } }
+    [ g_i_marshalling_tests_gtype_inout ]
+    with-out-parameters ;
+[ $ G_TYPE_INT ] [ gtype-inout ] unit-test
+
+! strings
+
+[ $ G_I_MARSHALLING_TESTS_CONSTANT_UTF8 ]
+[ g_i_marshalling_tests_utf8_none_return utf8 alien>string ] unit-test
+
+[ $ G_I_MARSHALLING_TESTS_CONSTANT_UTF8 ] [
+    [
+        g_i_marshalling_tests_utf8_full_return &g_free
+        utf8 alien>string
+    ] with-destructors
+] unit-test
+
+: utf8-none-out ( -- out )
+    { pointer: gchar }
+    [ g_i_marshalling_tests_utf8_none_out ]
+    with-out-parameters ;
+[ $ G_I_MARSHALLING_TESTS_CONSTANT_UTF8 ]
+[ utf8-none-out utf8 alien>string ] unit-test
+
+: utf8-full-out ( -- out )
+    { pointer: gchar }
+    [ g_i_marshalling_tests_utf8_full_out ]
+    with-out-parameters ;
+[ $ G_I_MARSHALLING_TESTS_CONSTANT_UTF8 ] [
+    [ utf8-full-out &g_free utf8 alien>string ] with-destructors
+] unit-test
+
+: utf8-dangling-out ( -- out )
+    { { pointer: gchar initial: f } }
+    [ g_i_marshalling_tests_utf8_dangling_out ]
+    with-out-parameters ;
+[ f ]
+[ utf8-dangling-out ] unit-test
+
+! arrays
+
+[ int-array{ -1 0 1 2 } ]
+[
+    g_i_marshalling_tests_array_fixed_int_return
+    4 <direct-int-array> >int-array
+] unit-test
+
+[ short-array{ -1 0 1 2 } ]
+[
+    g_i_marshalling_tests_array_fixed_short_return
+    4 <direct-short-array> >short-array
+] unit-test
+
+: array-fixed-out ( -- out )
+    { pointer: gint }
+    [ g_i_marshalling_tests_array_fixed_out ]
+    with-out-parameters ;
+[ int-array{ -1 0 1 2 } ]
+[
+    array-fixed-out
+    4 <direct-int-array> >int-array
+] unit-test
+
+: array-fixed-out-struct ( -- out )
+    { pointer: gint }
+    [ g_i_marshalling_tests_array_fixed_out_struct ]
+    with-out-parameters ;
+[ { { 7 6 } { 6 7 } } ]
+[
+    array-fixed-out-struct
+    2 <direct-GIMarshallingTestsSimpleStruct-array>
+    [ [ long_>> ] [ int8>> ] bi 2array ] { } map-as
+] unit-test
+
+: array-return ( -- array length )
+    { gint }
+    [ g_i_marshalling_tests_array_return ]
+    with-out-parameters ;
+[ int-array{ -1 0 1 2 } ]
+[ array-return <direct-int-array> >int-array ] unit-test
+
+: array-out ( -- array length )
+    { pointer: gint gint }
+    [ g_i_marshalling_tests_array_out ]
+    with-out-parameters ;
+[ int-array{ -1 0 1 2 } ]
+[ array-out <direct-int-array> >int-array ] unit-test
+
+[ { "0" "1" "2" f } ]
+[
+    g_i_marshalling_tests_array_zero_terminated_return
+    4 <direct-void*-array> [ utf8 alien>string ] { } map-as
+] unit-test
+
+: array-zero-terminated-out ( -- out )
+    { pointer: pointer: gchar }
+    [ g_i_marshalling_tests_array_zero_terminated_out ]
+    with-out-parameters ;
+[ { "0" "1" "2" f } ]
+[
+    array-zero-terminated-out
+    4 <direct-void*-array> [ utf8 alien>string ] { } map-as
+] unit-test
index 7e2c5eace6ad09efa981c3a272171a201a9aed60..30100de3b911572f932cb7007fa32d9a55148dc1 100644 (file)
@@ -15,7 +15,7 @@ IN: gobject.ffi
 >>
 
 TYPEDEF: void* GSignalCMarshaller
-TYPEDEF: void GStrv
+TYPEDEF: gchar** GStrv
 TYPEDEF: gchar* gchararray
 
 GIR: vocab:gobject/GObject-2.0.gir