[gobject-introspection] tests: Remove GIMarshallingTests, rename Everything to Regress



commit 456a79cb1d3fee93a3e6e1af9ef2948b0866bdd3
Author: Colin Walters <walters verbum org>
Date:   Sat Jul 31 06:56:09 2010 -0400

    tests: Remove GIMarshallingTests, rename Everything to Regress
    
    GIMarshallingTests will be replaced with automatically
    generated code; it was far from comprehensive, and was a pain
    to maintain.
    
    The namespacing in Everything was broken; it had an empty C
    prefix effectively, because all the symbols just started with
    "test".  We do want "test" as part of the symbols, since otherwise
    the exported API would be weird.  Fix this by changing the namespace
    to Regress (i.e. prefixing all the C code with Regress).  This
    makes sense anyways because Everything wasn't really Everything.
    
    We no longer install a pre-built regress.(so,gir,typelib); instead we
    install the C code to
    $(datadir)/gobject-introspection/tests/regress.[ch].
    Bindings should compile this.

 gir/GIMarshallingTests-1.0-expected.gir            | 3611 --------------------
 gir/Makefile.am                                    |   59 -
 gir/gimarshallingtests.c                           | 3523 -------------------
 gir/gimarshallingtests.h                           |  736 ----
 tests/Makefile.am                                  |   34 +
 tests/scanner/Makefile.am                          |   17 +
 .../scanner/Regress-1.0-expected.gir               |  650 ++--
 tests/scanner/regress.c                            | 2913 ++++++++++++++++
 tests/scanner/regress.h                            |  506 +++
 9 files changed, 3812 insertions(+), 8237 deletions(-)
---
diff --git a/gir/Makefile.am b/gir/Makefile.am
index e447762..2a99986 100644
--- a/gir/Makefile.am
+++ b/gir/Makefile.am
@@ -161,65 +161,6 @@ GIRepository_2_0_gir_FILES = \
 
 INTROSPECTION_GIRS += GIRepository-2.0.gir
 
-# everything
-LT_CURRENT = 1
-LT_REVISION = 0
-LT_AGE = 0
-LT_VERSION = $(LT_CURRENT):$(LT_REVISION):$(LT_AGE)
-TYPELIB_VERSION = $(LT_CURRENT).0
-
-lib_LTLIBRARIES =
-
-libgirepository_everything_1_0_la_SOURCES = everything.c everything.h
-libgirepository_everything_1_0_la_CFLAGS = $(GOBJECT_CFLAGS) $(CAIRO_CFLAGS)
-libgirepository_everything_1_0_la_LDFLAGS = -version-info $(LT_VERSION)
-libgirepository_everything_1_0_la_LIBADD = $(GOBJECT_LIBS) $(CAIRO_LIBS)
-
-if OS_WIN32
-libgirepository_everything_1_0_la_LDFLAGS += -no-undefined
-endif
-
-if BUILD_TESTS
-Everything-1.0.gir: Gio-2.0.gir libgirepository-everything-1.0.la
-
-Everything_1_0_gir_LIBS = libgirepository-everything-1.0.la
-Everything_1_0_gir_SCANNERFLAGS = --warn-all --warn-error
-Everything_1_0_gir_PACKAGES = gobject-2.0 cairo gio-2.0
-Everything_1_0_gir_INCLUDES = GObject-2.0 cairo-1.0 Gio-2.0
-Everything_1_0_gir_FILES = everything.h everything.c
-
-if HAVE_CAIRO
-INTROSPECTION_GIRS += Everything-$(TYPELIB_VERSION).gir
-EXPECTEDGIRS += Everything-$(TYPELIB_VERSION)-expected.gir
-lib_LTLIBRARIES += libgirepository-everything-1.0.la
-endif
-
-
-# marshalling tests
-lib_LTLIBRARIES += libgirepository-gimarshallingtests-1.0.la
-
-libgirepository_gimarshallingtests_1_0_la_SOURCES = gimarshallingtests.c gimarshallingtests.h
-libgirepository_gimarshallingtests_1_0_la_CFLAGS = $(GOBJECT_CFLAGS)
-libgirepository_gimarshallingtests_1_0_la_LDFLAGS = -version-info $(LT_VERSION)
-libgirepository_gimarshallingtests_1_0_la_LIBADD = $(GOBJECT_LIBS)
-
-if OS_WIN32
-libgirepository_gimarshallingtests_1_0_la_LDFLAGS += -no-undefined
-endif
-
-GIMarshallingTests-1.0.gir: libgirepository-gimarshallingtests-1.0.la GObject-2.0.gir
-
-GIMarshallingTests_1_0_gir_LIBS = libgirepository-gimarshallingtests-1.0.la
-GIMarshallingTests_1_0_gir_PACKAGES = gobject-2.0
-GIMarshallingTests_1_0_gir_INCLUDES = GObject-2.0
-GIMarshallingTests_1_0_gir_FILES = gimarshallingtests.h gimarshallingtests.c
-GIMarshallingTests_1_0_gir_SCANNERFLAGS = --warn-all --warn-error
-
-INTROSPECTION_GIRS += GIMarshallingTests-$(TYPELIB_VERSION).gir
-EXPECTEDGIRS += GIMarshallingTests-$(TYPELIB_VERSION)-expected.gir
-
-endif
-
 # Generic rules
 CLEANFILES += $(INTROSPECTION_GIRS)
 
diff --git a/tests/Makefile.am b/tests/Makefile.am
index 0c51358..a86a750 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -1 +1,35 @@
 SUBDIRS = . scanner repository offsets
+
+BUILT_SOURCES=
+CLEANFILES=
+
+INCLUDES = $(GOBJECT_CFLAGS)
+LIBADD = $(GOBJECT_LIBS)
+
+noinst_LTLIBRARIES = libeverything-1.0.la
+
+libeverything_1_0_la_SOURCES = everything.c
+
+BUILT_SOURCES += everything.c everything.h
+
+CLEANFILES += $(BUILT_SOURCES) everything-stamp.h
+everything-stamp.h: Makefile
+	$(AM_V_GEN) $(top_builddir)/tools/g-ir-scanner --test-codegen=Everything,everything.h,everything.c
+	touch $@
+
+everything.c: everything-stamp.h
+	@true
+
+everything.h: everything-stamp.h
+	@true
+
+Everything-1.0.gir: libeverything-1.0.la
+	$(AM_V_GEN) $(top_builddir)/tools/g-ir-scanner --warn-all --reparse-validate --namespace=Everything --version=1.0 --library=libeverything-1.0.la everything.h everything.c --output=$@
+
+Everything-1.0.typelib: Everything-1.0.gir
+	$(AM_V_GEN) $(top_builddir)/tools/g-ir-compiler $< -o $@
+
+install-data-local:
+	for src in everything.c everything.h; do \
+	  install -m 644 -D $$src $(datadir)/gobject-introspection-1.0/tests/$$src; \
+	done
diff --git a/tests/scanner/Makefile.am b/tests/scanner/Makefile.am
index 42a7f72..0e11120 100644
--- a/tests/scanner/Makefile.am
+++ b/tests/scanner/Makefile.am
@@ -10,6 +10,7 @@ testlib_LTLIBRARIES = \
 	libdrawable.la \
 	libfoo.la \
 	libutility.la \
+	libregress.la \
 	libgtkfrob.la
 testlibdir = $(prefix)/unused
 install-testlibLTLIBRARIES: # prevent it from being installed
@@ -24,6 +25,16 @@ libdrawable_la_SOURCES = $(srcdir)/drawable.c $(srcdir)/drawable.h
 libfoo_la_SOURCES = $(srcdir)/foo.c $(srcdir)/foo.h
 libutility_la_SOURCES = $(srcdir)/utility.c $(srcdir)/utility.h
 libgtkfrob_la_SOURCES = $(srcdir)/gtkfrob.c $(srcdir)/gtkfrob.h
+libregress_la_SOURCES = $(srcdir)/regress.c $(srcdir)/regress.h
+
+install-data-local:
+	for src in $(libregress_la_SOURCES); do \
+	  install -m 644 -D $$src $(datadir)/gobject-introspection-1.0/tests/$$src; \
+	done
+
+libregress_la_CFLAGS = $(AM_CFLAGS) $(CAIRO_CFLAGS)
+libregress_la_LDFLAGS = $(AM_LDFLAGS) $(CAIRO_LIBS) 
+
 
 if OS_WIN32
 AM_LDFLAGS += -no-undefined
@@ -39,6 +50,12 @@ CLEANFILES = $(TYPELIBS) $(GIRS)
 BUILT_SOURCES = $(TYPELIBS) $(GIRS)
 EXTRA_DIST = $(EXPECTEDGIRS)
 
+Regress-1.0.gir: $(top_builddir)/gir/Gio-2.0.gir libregress.la
+Regress_1_0_gir_LIBS = libregress.la
+Regress_1_0_gir_INCLUDES = cairo-1.0 Gio-2.0
+Regress_1_0_gir_FILES = $(libregress_la_SOURCES)
+GIRS += Regress-1.0.gir
+
 annotation-1.0.gir: utility-1.0.gir libannotation.la
 annotation_1_0_gir_PACKAGES = gobject-2.0
 annotation_1_0_gir_LIBS = libannotation.la
diff --git a/gir/Everything-1.0-expected.gir b/tests/scanner/Regress-1.0-expected.gir
similarity index 78%
rename from gir/Everything-1.0-expected.gir
rename to tests/scanner/Regress-1.0-expected.gir
index 91550a9..aa51b0a 100644
--- a/gir/Everything-1.0-expected.gir
+++ b/tests/scanner/Regress-1.0-expected.gir
@@ -10,35 +10,32 @@ and/or use gtk-doc annotations.  -->
   <include name="GObject" version="2.0"/>
   <include name="Gio" version="2.0"/>
   <include name="cairo" version="1.0"/>
-  <package name="cairo"/>
-  <package name="gio-2.0"/>
-  <package name="gobject-2.0"/>
-  <namespace name="Everything"
+  <namespace name="Regress"
              version="1.0"
-             shared-library="libgirepository-everything-1.0.so.1"
-             c:prefix="Everything">
+             shared-library="libregress.so"
+             c:prefix="Regress">
     <record name="TestBoxed"
-            c:type="TestBoxed"
-            glib:type-name="TestBoxed"
-            glib:get-type="test_boxed_get_type">
+            c:type="RegressTestBoxed"
+            glib:type-name="RegressTestBoxed"
+            glib:get-type="regress_test_boxed_get_type">
       <field name="some_int8" writable="1">
         <type name="int8" c:type="gint8"/>
       </field>
       <field name="nested_a" writable="1">
-        <type name="TestSimpleBoxedA" c:type="TestSimpleBoxedA"/>
+        <type name="TestSimpleBoxedA" c:type="RegressTestSimpleBoxedA"/>
       </field>
       <field name="priv" writable="1">
-        <type name="TestBoxedPrivate" c:type="TestBoxedPrivate*"/>
+        <type name="TestBoxedPrivate" c:type="RegressTestBoxedPrivate*"/>
       </field>
-      <constructor name="new" c:identifier="test_boxed_new">
+      <constructor name="new" c:identifier="regress_test_boxed_new">
         <return-value transfer-ownership="full">
-          <type name="TestBoxed" c:type="TestBoxed*"/>
+          <type name="TestBoxed" c:type="RegressTestBoxed*"/>
         </return-value>
       </constructor>
       <constructor name="new_alternative_constructor1"
-                   c:identifier="test_boxed_new_alternative_constructor1">
+                   c:identifier="regress_test_boxed_new_alternative_constructor1">
         <return-value transfer-ownership="full">
-          <type name="TestBoxed" c:type="TestBoxed*"/>
+          <type name="TestBoxed" c:type="RegressTestBoxed*"/>
         </return-value>
         <parameters>
           <parameter name="i" transfer-ownership="none">
@@ -47,9 +44,9 @@ and/or use gtk-doc annotations.  -->
         </parameters>
       </constructor>
       <constructor name="new_alternative_constructor2"
-                   c:identifier="test_boxed_new_alternative_constructor2">
+                   c:identifier="regress_test_boxed_new_alternative_constructor2">
         <return-value transfer-ownership="full">
-          <type name="TestBoxed" c:type="TestBoxed*"/>
+          <type name="TestBoxed" c:type="RegressTestBoxed*"/>
         </return-value>
         <parameters>
           <parameter name="i" transfer-ownership="none">
@@ -61,9 +58,9 @@ and/or use gtk-doc annotations.  -->
         </parameters>
       </constructor>
       <constructor name="new_alternative_constructor3"
-                   c:identifier="test_boxed_new_alternative_constructor3">
+                   c:identifier="regress_test_boxed_new_alternative_constructor3">
         <return-value transfer-ownership="full">
-          <type name="TestBoxed" c:type="TestBoxed*"/>
+          <type name="TestBoxed" c:type="RegressTestBoxed*"/>
         </return-value>
         <parameters>
           <parameter name="s" transfer-ownership="full">
@@ -71,30 +68,30 @@ and/or use gtk-doc annotations.  -->
           </parameter>
         </parameters>
       </constructor>
-      <method name="copy" c:identifier="test_boxed_copy">
+      <method name="copy" c:identifier="regress_test_boxed_copy">
         <return-value transfer-ownership="full">
-          <type name="TestBoxed" c:type="TestBoxed*"/>
+          <type name="TestBoxed" c:type="RegressTestBoxed*"/>
         </return-value>
       </method>
-      <method name="equals" c:identifier="test_boxed_equals">
+      <method name="equals" c:identifier="regress_test_boxed_equals">
         <return-value transfer-ownership="none">
           <type name="boolean" c:type="gboolean"/>
         </return-value>
         <parameters>
           <parameter name="other" transfer-ownership="none">
-            <type name="TestBoxed" c:type="TestBoxed*"/>
+            <type name="TestBoxed" c:type="RegressTestBoxed*"/>
           </parameter>
         </parameters>
       </method>
     </record>
-    <record name="TestBoxedPrivate" c:type="TestBoxedPrivate">
+    <record name="TestBoxedPrivate" c:type="RegressTestBoxedPrivate">
     </record>
-    <callback name="TestCallback" c:type="TestCallback">
+    <callback name="TestCallback" c:type="RegressTestCallback">
       <return-value transfer-ownership="none">
         <type name="int" c:type="int"/>
       </return-value>
     </callback>
-    <callback name="TestCallbackUserData" c:type="TestCallbackUserData">
+    <callback name="TestCallbackUserData" c:type="RegressTestCallbackUserData">
       <return-value transfer-ownership="none">
         <type name="int" c:type="int"/>
       </return-value>
@@ -105,26 +102,26 @@ and/or use gtk-doc annotations.  -->
       </parameters>
     </callback>
     <enumeration name="TestEnum"
-                 glib:type-name="TestEnum"
-                 glib:get-type="test_enum_get_type"
-                 c:type="TestEnum">
+                 glib:type-name="RegressTestEnum"
+                 glib:get-type="regress_test_enum_get_type"
+                 c:type="RegressTestEnum">
       <member name="value1"
               value="0"
-              c:identifier="TEST_VALUE1"
+              c:identifier="REGRESS_TEST_VALUE1"
               glib:nick="value1"/>
       <member name="value2"
               value="1"
-              c:identifier="TEST_VALUE2"
+              c:identifier="REGRESS_TEST_VALUE2"
               glib:nick="value2"/>
       <member name="value3"
               value="42"
-              c:identifier="TEST_VALUE3"
+              c:identifier="REGRESS_TEST_VALUE3"
               glib:nick="value3"/>
     </enumeration>
     <bitfield name="TestFlags"
-              glib:type-name="TestFlags"
-              glib:get-type="test_flags_get_type"
-              c:type="TestFlags">
+              glib:type-name="RegressTestFlags"
+              glib:get-type="regress_test_flags_get_type"
+              c:type="RegressTestFlags">
       <member name="flag1"
               value="1"
               c:identifier="TEST_FLAG1"
@@ -139,14 +136,15 @@ and/or use gtk-doc annotations.  -->
               glib:nick="flag3"/>
     </bitfield>
     <class name="TestFloating"
-           c:type="TestFloating"
+           c:type="RegressTestFloating"
            parent="GObject.InitiallyUnowned"
-           glib:type-name="TestFloating"
-           glib:get-type="test_floating_get_type"
+           glib:type-name="RegressTestFloating"
+           glib:get-type="regress_test_floating_get_type"
            glib:type-struct="TestFloatingClass">
-      <constructor name="new" c:identifier="test_floating_new">
+      <constructor name="new" c:identifier="regress_test_floating_new">
         <return-value transfer-ownership="full">
-          <type name="TestFloating" c:type="TestFloating*"/>
+          <doc xml:whitespace="preserve">A new floating #RegressTestFloating</doc>
+          <type name="TestFloating" c:type="RegressTestFloating*"/>
         </return-value>
       </constructor>
       <field name="parent_instance">
@@ -154,7 +152,7 @@ and/or use gtk-doc annotations.  -->
       </field>
     </class>
     <record name="TestFloatingClass"
-            c:type="TestFloatingClass"
+            c:type="RegressTestFloatingClass"
             glib:is-gtype-struct-for="TestFloating">
       <field name="parent_class">
         <type name="GObject.InitiallyUnownedClass"
@@ -162,22 +160,25 @@ and/or use gtk-doc annotations.  -->
       </field>
     </record>
     <class name="TestFundamentalObject"
-           c:type="TestFundamentalObject"
+           c:type="RegressTestFundamentalObject"
            abstract="1"
-           glib:type-name="TestFundamentalObject"
-           glib:get-type="test_fundamental_object_get_type"
+           glib:type-name="RegressTestFundamentalObject"
+           glib:get-type="regress_test_fundamental_object_get_type"
            glib:type-struct="TestFundamentalObjectClass"
            glib:fundamental="1"
-           glib:ref-func="test_fundamental_object_ref"
-           glib:unref-func="test_fundamental_object_unref"
-           glib:set-value-func="test_value_set_fundamental_object"
-           glib:get-value-func="test_value_get_fundamental_object">
-      <method name="ref" c:identifier="test_fundamental_object_ref">
+           glib:ref-func="regress_test_fundamental_object_ref"
+           glib:unref-func="regress_test_fundamental_object_unref"
+           glib:set-value-func="regress_test_value_set_fundamental_object"
+           glib:get-value-func="regress_test_value_get_fundamental_object">
+      <method name="ref" c:identifier="regress_test_fundamental_object_ref">
         <return-value transfer-ownership="full">
-          <type name="TestFundamentalObject" c:type="TestFundamentalObject*"/>
+          <doc xml:whitespace="preserve">A new #RegressTestFundamentalObject</doc>
+          <type name="TestFundamentalObject"
+                c:type="RegressTestFundamentalObject*"/>
         </return-value>
       </method>
-      <method name="unref" c:identifier="test_fundamental_object_unref">
+      <method name="unref"
+              c:identifier="regress_test_fundamental_object_unref">
         <return-value transfer-ownership="none">
           <type name="none" c:type="void"/>
         </return-value>
@@ -193,53 +194,57 @@ and/or use gtk-doc annotations.  -->
       </field>
     </class>
     <record name="TestFundamentalObjectClass"
-            c:type="TestFundamentalObjectClass"
+            c:type="RegressTestFundamentalObjectClass"
             glib:is-gtype-struct-for="TestFundamentalObject">
       <field name="type_class">
         <type name="GObject.TypeClass" c:type="GTypeClass"/>
       </field>
       <field name="copy">
         <type name="TestFundamentalObjectCopyFunction"
-              c:type="TestFundamentalObjectCopyFunction"/>
+              c:type="RegressTestFundamentalObjectCopyFunction"/>
       </field>
       <field name="finalize">
         <type name="TestFundamentalObjectFinalizeFunction"
-              c:type="TestFundamentalObjectFinalizeFunction"/>
+              c:type="RegressTestFundamentalObjectFinalizeFunction"/>
       </field>
     </record>
     <callback name="TestFundamentalObjectCopyFunction"
-              c:type="TestFundamentalObjectCopyFunction">
+              c:type="RegressTestFundamentalObjectCopyFunction">
       <return-value transfer-ownership="full">
-        <type name="TestFundamentalObject" c:type="TestFundamentalObject*"/>
+        <type name="TestFundamentalObject"
+              c:type="RegressTestFundamentalObject*"/>
       </return-value>
       <parameters>
         <parameter name="obj" transfer-ownership="none">
-          <type name="TestFundamentalObject" c:type="TestFundamentalObject*"/>
+          <type name="TestFundamentalObject"
+                c:type="RegressTestFundamentalObject*"/>
         </parameter>
       </parameters>
     </callback>
     <callback name="TestFundamentalObjectFinalizeFunction"
-              c:type="TestFundamentalObjectFinalizeFunction">
+              c:type="RegressTestFundamentalObjectFinalizeFunction">
       <return-value transfer-ownership="none">
         <type name="none" c:type="void"/>
       </return-value>
       <parameters>
         <parameter name="obj" transfer-ownership="none">
-          <type name="TestFundamentalObject" c:type="TestFundamentalObject*"/>
+          <type name="TestFundamentalObject"
+                c:type="RegressTestFundamentalObject*"/>
         </parameter>
       </parameters>
     </callback>
     <class name="TestFundamentalSubObject"
-           c:type="TestFundamentalSubObject"
+           c:type="RegressTestFundamentalSubObject"
            parent="TestFundamentalObject"
-           glib:type-name="TestFundamentalSubObject"
-           glib:get-type="test_fundamental_sub_object_get_type"
+           glib:type-name="RegressTestFundamentalSubObject"
+           glib:get-type="regress_test_fundamental_sub_object_get_type"
            glib:type-struct="TestFundamentalSubObjectClass"
            glib:fundamental="1">
-      <constructor name="new" c:identifier="test_fundamental_sub_object_new">
+      <constructor name="new"
+                   c:identifier="regress_test_fundamental_sub_object_new">
         <return-value transfer-ownership="full">
           <type name="TestFundamentalSubObject"
-                c:type="TestFundamentalSubObject*"/>
+                c:type="RegressTestFundamentalSubObject*"/>
         </return-value>
         <parameters>
           <parameter name="data" transfer-ownership="none">
@@ -248,44 +253,45 @@ and/or use gtk-doc annotations.  -->
         </parameters>
       </constructor>
       <field name="fundamental_object">
-        <type name="TestFundamentalObject" c:type="TestFundamentalObject"/>
+        <type name="TestFundamentalObject"
+              c:type="RegressTestFundamentalObject"/>
       </field>
       <field name="data">
         <type name="utf8" c:type="char*"/>
       </field>
     </class>
     <record name="TestFundamentalSubObjectClass"
-            c:type="TestFundamentalSubObjectClass"
+            c:type="RegressTestFundamentalSubObjectClass"
             glib:is-gtype-struct-for="TestFundamentalSubObject">
       <field name="fundamental_object_class">
         <type name="TestFundamentalObjectClass"
-              c:type="TestFundamentalObjectClass"/>
+              c:type="RegressTestFundamentalObjectClass"/>
       </field>
     </record>
     <interface name="TestInterface"
-               c:type="EverythingTestInterface"
-               glib:type-name="EverythingTestInterface"
-               glib:get-type="test_interface_get_type"
+               c:type="RegressTestInterface"
+               glib:type-name="RegressTestInterface"
+               glib:get-type="regress_test_interface_get_type"
                glib:type-struct="TestInterfaceIface">
     </interface>
     <record name="TestInterfaceIface"
-            c:type="TestInterfaceIface"
+            c:type="RegressTestInterfaceIface"
             glib:is-gtype-struct-for="TestInterface">
       <field name="base_iface">
         <type name="GObject.TypeInterface" c:type="GTypeInterface"/>
       </field>
     </record>
     <class name="TestObj"
-           c:type="TestObj"
+           c:type="RegressTestObj"
            parent="GObject.Object"
-           glib:type-name="TestObj"
-           glib:get-type="test_obj_get_type"
+           glib:type-name="RegressTestObj"
+           glib:get-type="regress_test_obj_get_type"
            glib:type-struct="TestObjClass">
       <constructor name="new_from_file"
-                   c:identifier="test_obj_new_from_file"
+                   c:identifier="regress_test_obj_new_from_file"
                    throws="1">
         <return-value transfer-ownership="full">
-          <type name="TestObj" c:type="TestObj*"/>
+          <type name="TestObj" c:type="RegressTestObj*"/>
         </return-value>
         <parameters>
           <parameter name="x" transfer-ownership="none">
@@ -293,9 +299,10 @@ and/or use gtk-doc annotations.  -->
           </parameter>
         </parameters>
       </constructor>
-      <constructor name="new_callback" c:identifier="test_obj_new_callback">
+      <constructor name="new_callback"
+                   c:identifier="regress_test_obj_new_callback">
         <return-value transfer-ownership="full">
-          <type name="TestObj" c:type="TestObj*"/>
+          <type name="TestObj" c:type="RegressTestObj*"/>
         </return-value>
         <parameters>
           <parameter name="callback"
@@ -303,7 +310,8 @@ and/or use gtk-doc annotations.  -->
                      scope="notified"
                      closure="1"
                      destroy="2">
-            <type name="TestCallbackUserData" c:type="TestCallbackUserData"/>
+            <type name="TestCallbackUserData"
+                  c:type="RegressTestCallbackUserData"/>
           </parameter>
           <parameter name="user_data" transfer-ownership="none">
             <type name="any" c:type="gpointer"/>
@@ -313,7 +321,8 @@ and/or use gtk-doc annotations.  -->
           </parameter>
         </parameters>
       </constructor>
-      <function name="static_method" c:identifier="test_obj_static_method">
+      <function name="static_method"
+                c:identifier="regress_test_obj_static_method">
         <return-value transfer-ownership="none">
           <type name="double" c:type="double"/>
         </return-value>
@@ -324,7 +333,7 @@ and/or use gtk-doc annotations.  -->
         </parameters>
       </function>
       <function name="static_method_callback"
-                c:identifier="test_obj_static_method_callback">
+                c:identifier="regress_test_obj_static_method_callback">
         <return-value transfer-ownership="none">
           <type name="none" c:type="void"/>
         </return-value>
@@ -333,7 +342,7 @@ and/or use gtk-doc annotations.  -->
                      transfer-ownership="none"
                      allow-none="1"
                      scope="call">
-            <type name="TestCallback" c:type="TestCallback"/>
+            <type name="TestCallback" c:type="RegressTestCallback"/>
           </parameter>
         </parameters>
       </function>
@@ -351,7 +360,7 @@ case.</doc>
           </parameter>
         </parameters>
       </virtual-method>
-      <method name="set_bare" c:identifier="test_obj_set_bare">
+      <method name="set_bare" c:identifier="regress_test_obj_set_bare">
         <return-value transfer-ownership="none">
           <type name="none" c:type="void"/>
         </return-value>
@@ -361,13 +370,14 @@ case.</doc>
           </parameter>
         </parameters>
       </method>
-      <method name="instance_method" c:identifier="test_obj_instance_method">
+      <method name="instance_method"
+              c:identifier="regress_test_obj_instance_method">
         <return-value transfer-ownership="none">
           <type name="int" c:type="int"/>
         </return-value>
       </method>
       <method name="torture_signature_0"
-              c:identifier="test_obj_torture_signature_0">
+              c:identifier="regress_test_obj_torture_signature_0">
         <return-value transfer-ownership="none">
           <type name="none" c:type="void"/>
         </return-value>
@@ -402,7 +412,7 @@ case.</doc>
         </parameters>
       </method>
       <method name="torture_signature_1"
-              c:identifier="test_obj_torture_signature_1"
+              c:identifier="regress_test_obj_torture_signature_1"
               throws="1">
         <doc xml:whitespace="preserve">This function throws an error if m is odd.</doc>
         <return-value transfer-ownership="none">
@@ -438,7 +448,7 @@ case.</doc>
           </parameter>
         </parameters>
       </method>
-      <method name="do_matrix" c:identifier="test_obj_do_matrix">
+      <method name="do_matrix" c:identifier="regress_test_obj_do_matrix">
         <doc xml:whitespace="preserve">This method is virtual.  Notably its name differs from the virtual
 slot name, which makes it useful for testing bindings handle this
 case.</doc>
@@ -452,8 +462,18 @@ case.</doc>
           </parameter>
         </parameters>
       </method>
+      <method name="null_in" c:identifier="regress_test_obj_null_in">
+        <return-value transfer-ownership="none">
+          <type name="none" c:type="void"/>
+        </return-value>
+      </method>
+      <method name="null_out" c:identifier="regress_test_obj_null_out">
+        <return-value transfer-ownership="none">
+          <type name="none" c:type="void"/>
+        </return-value>
+      </method>
       <method name="instance_method_callback"
-              c:identifier="test_obj_instance_method_callback">
+              c:identifier="regress_test_obj_instance_method_callback">
         <return-value transfer-ownership="none">
           <type name="none" c:type="void"/>
         </return-value>
@@ -462,7 +482,7 @@ case.</doc>
                      transfer-ownership="none"
                      allow-none="1"
                      scope="call">
-            <type name="TestCallback" c:type="TestCallback"/>
+            <type name="TestCallback" c:type="RegressTestCallback"/>
           </parameter>
         </parameters>
       </method>
@@ -470,13 +490,13 @@ case.</doc>
         <type name="GObject.Object" c:type="GObject"/>
       </property>
       <property name="boxed" writable="1" transfer-ownership="none">
-        <type name="TestBoxed" c:type="TestBoxed"/>
+        <type name="TestBoxed" c:type="RegressTestBoxed"/>
       </property>
       <property name="double" writable="1" transfer-ownership="none">
-        <type name="double" c:type="gdouble"/>
+        <type name="gdouble"/>
       </property>
       <property name="float" writable="1" transfer-ownership="none">
-        <type name="float" c:type="gfloat"/>
+        <type name="gfloat"/>
       </property>
       <property name="hash-table" writable="1" transfer-ownership="container">
         <type name="GLib.HashTable" c:type="GHashTable">
@@ -485,7 +505,7 @@ case.</doc>
         </type>
       </property>
       <property name="int" writable="1" transfer-ownership="none">
-        <type name="int" c:type="gint"/>
+        <type name="gint"/>
       </property>
       <property name="list" writable="1" transfer-ownership="none">
         <type name="GLib.List" c:type="gpointer">
@@ -493,7 +513,7 @@ case.</doc>
         </type>
       </property>
       <property name="string" writable="1" transfer-ownership="none">
-        <type name="utf8" c:type="gchararray"/>
+        <type name="utf8"/>
       </property>
       <field name="parent_instance">
         <type name="GObject.Object" c:type="GObject"/>
@@ -502,7 +522,7 @@ case.</doc>
         <type name="GObject.Object" c:type="GObject*"/>
       </field>
       <field name="boxed">
-        <type name="TestBoxed" c:type="TestBoxed*"/>
+        <type name="TestBoxed" c:type="RegressTestBoxed*"/>
       </field>
       <field name="hash_table">
         <type name="GLib.HashTable" c:type="GHashTable*"/>
@@ -513,13 +533,13 @@ case.</doc>
         </type>
       </field>
       <field name="some_int8">
-        <type name="int8" c:type="gint8"/>
+        <type name="gint8" c:type="gint8"/>
       </field>
       <field name="some_float">
-        <type name="float" c:type="float"/>
+        <type name="gfloat" c:type="float"/>
       </field>
       <field name="some_double">
-        <type name="double" c:type="double"/>
+        <type name="gdouble" c:type="double"/>
       </field>
       <field name="string">
         <type name="utf8" c:type="char*"/>
@@ -535,13 +555,13 @@ case.</doc>
         </return-value>
         <parameters>
           <parameter name="object" transfer-ownership="none">
-            <type name="TestSimpleBoxedA" c:type="TestSimpleBoxedA"/>
+            <type name="TestSimpleBoxedA" c:type="RegressTestSimpleBoxedA"/>
           </parameter>
         </parameters>
       </glib:signal>
     </class>
     <record name="TestObjClass"
-            c:type="TestObjClass"
+            c:type="RegressTestObjClass"
             glib:is-gtype-struct-for="TestObj">
       <field name="parent_class">
         <type name="GObject.ObjectClass" c:type="GObjectClass"/>
@@ -553,7 +573,7 @@ case.</doc>
           </return-value>
           <parameters>
             <parameter name="obj" transfer-ownership="none">
-              <type name="TestObj" c:type="TestObj*"/>
+              <type name="TestObj" c:type="RegressTestObj*"/>
             </parameter>
             <parameter name="somestr" transfer-ownership="none">
               <doc xml:whitespace="preserve">Meaningless string</doc>
@@ -570,9 +590,9 @@ case.</doc>
       </field>
     </record>
     <record name="TestSimpleBoxedA"
-            c:type="TestSimpleBoxedA"
-            glib:type-name="TestSimpleBoxedA"
-            glib:get-type="test_simple_boxed_a_get_type">
+            c:type="RegressTestSimpleBoxedA"
+            glib:type-name="RegressTestSimpleBoxedA"
+            glib:get-type="regress_test_simple_boxed_a_get_type">
       <field name="some_int" writable="1">
         <type name="int" c:type="gint"/>
       </field>
@@ -583,46 +603,46 @@ case.</doc>
         <type name="double" c:type="gdouble"/>
       </field>
       <field name="some_enum" writable="1">
-        <type name="TestEnum" c:type="TestEnum"/>
+        <type name="TestEnum" c:type="RegressTestEnum"/>
       </field>
-      <method name="copy" c:identifier="test_simple_boxed_a_copy">
+      <method name="copy" c:identifier="regress_test_simple_boxed_a_copy">
         <return-value transfer-ownership="full">
-          <type name="TestSimpleBoxedA" c:type="TestSimpleBoxedA*"/>
+          <type name="TestSimpleBoxedA" c:type="RegressTestSimpleBoxedA*"/>
         </return-value>
       </method>
-      <method name="equals" c:identifier="test_simple_boxed_a_equals">
+      <method name="equals" c:identifier="regress_test_simple_boxed_a_equals">
         <return-value transfer-ownership="none">
           <type name="boolean" c:type="gboolean"/>
         </return-value>
         <parameters>
           <parameter name="other_a" transfer-ownership="none">
-            <type name="TestSimpleBoxedA" c:type="TestSimpleBoxedA*"/>
+            <type name="TestSimpleBoxedA" c:type="RegressTestSimpleBoxedA*"/>
           </parameter>
         </parameters>
       </method>
     </record>
     <record name="TestSimpleBoxedB"
-            c:type="TestSimpleBoxedB"
-            glib:type-name="TestSimpleBoxedB"
-            glib:get-type="test_simple_boxed_b_get_type">
+            c:type="RegressTestSimpleBoxedB"
+            glib:type-name="RegressTestSimpleBoxedB"
+            glib:get-type="regress_test_simple_boxed_b_get_type">
       <field name="some_int8" writable="1">
         <type name="int8" c:type="gint8"/>
       </field>
       <field name="nested_a" writable="1">
-        <type name="TestSimpleBoxedA" c:type="TestSimpleBoxedA"/>
+        <type name="TestSimpleBoxedA" c:type="RegressTestSimpleBoxedA"/>
       </field>
-      <method name="copy" c:identifier="test_simple_boxed_b_copy">
+      <method name="copy" c:identifier="regress_test_simple_boxed_b_copy">
         <return-value transfer-ownership="full">
-          <type name="TestSimpleBoxedB" c:type="TestSimpleBoxedB*"/>
+          <type name="TestSimpleBoxedB" c:type="RegressTestSimpleBoxedB*"/>
         </return-value>
       </method>
     </record>
-    <callback name="TestSimpleCallback" c:type="TestSimpleCallback">
+    <callback name="TestSimpleCallback" c:type="RegressTestSimpleCallback">
       <return-value transfer-ownership="none">
         <type name="none" c:type="void"/>
       </return-value>
     </callback>
-    <record name="TestStructA" c:type="TestStructA">
+    <record name="TestStructA" c:type="RegressTestStructA">
       <field name="some_int" writable="1">
         <type name="int" c:type="gint"/>
       </field>
@@ -633,10 +653,10 @@ case.</doc>
         <type name="double" c:type="gdouble"/>
       </field>
       <field name="some_enum" writable="1">
-        <type name="TestEnum" c:type="TestEnum"/>
+        <type name="TestEnum" c:type="RegressTestEnum"/>
       </field>
-      <method name="clone" c:identifier="test_struct_a_clone">
-        <doc xml:whitespace="preserve">Make a copy of a TestStructA</doc>
+      <method name="clone" c:identifier="regress_test_struct_a_clone">
+        <doc xml:whitespace="preserve">Make a copy of a RegressTestStructA</doc>
         <return-value transfer-ownership="none">
           <type name="none" c:type="void"/>
         </return-value>
@@ -646,20 +666,20 @@ case.</doc>
                      caller-allocates="1"
                      transfer-ownership="none">
             <doc xml:whitespace="preserve">the cloned structure</doc>
-            <type name="TestStructA" c:type="TestStructA*"/>
+            <type name="TestStructA" c:type="RegressTestStructA*"/>
           </parameter>
         </parameters>
       </method>
     </record>
-    <record name="TestStructB" c:type="TestStructB">
+    <record name="TestStructB" c:type="RegressTestStructB">
       <field name="some_int8" writable="1">
         <type name="int8" c:type="gint8"/>
       </field>
       <field name="nested_a" writable="1">
-        <type name="TestStructA" c:type="TestStructA"/>
+        <type name="TestStructA" c:type="RegressTestStructA"/>
       </field>
-      <method name="clone" c:identifier="test_struct_b_clone">
-        <doc xml:whitespace="preserve">Make a copy of a TestStructB</doc>
+      <method name="clone" c:identifier="regress_test_struct_b_clone">
+        <doc xml:whitespace="preserve">Make a copy of a RegressTestStructB</doc>
         <return-value transfer-ownership="none">
           <type name="none" c:type="void"/>
         </return-value>
@@ -669,12 +689,12 @@ case.</doc>
                      caller-allocates="1"
                      transfer-ownership="none">
             <doc xml:whitespace="preserve">the cloned structure</doc>
-            <type name="TestStructB" c:type="TestStructB*"/>
+            <type name="TestStructB" c:type="RegressTestStructB*"/>
           </parameter>
         </parameters>
       </method>
     </record>
-    <record name="TestStructC" c:type="_TestStructC">
+    <record name="TestStructC" c:type="_RegressTestStructC">
       <field name="another_int" writable="1">
         <type name="int" c:type="gint"/>
       </field>
@@ -683,51 +703,51 @@ case.</doc>
       </field>
     </record>
     <class name="TestSubObj"
-           c:type="TestSubObj"
+           c:type="RegressTestSubObj"
            parent="TestObj"
-           glib:type-name="TestSubObj"
-           glib:get-type="test_sub_obj_get_type"
+           glib:type-name="RegressTestSubObj"
+           glib:get-type="regress_test_sub_obj_get_type"
            glib:type-struct="TestSubObjClass">
-      <constructor name="new" c:identifier="test_sub_obj_new">
+      <constructor name="new" c:identifier="regress_test_sub_obj_new">
         <return-value transfer-ownership="full">
-          <type name="TestSubObj" c:type="TestSubObj*"/>
+          <type name="TestSubObj" c:type="RegressTestSubObj*"/>
         </return-value>
       </constructor>
-      <method name="unset_bare" c:identifier="test_sub_obj_unset_bare">
+      <method name="unset_bare" c:identifier="regress_test_sub_obj_unset_bare">
         <return-value transfer-ownership="none">
           <type name="none" c:type="void"/>
         </return-value>
       </method>
       <method name="instance_method"
-              c:identifier="test_sub_obj_instance_method">
+              c:identifier="regress_test_sub_obj_instance_method">
         <return-value transfer-ownership="none">
           <type name="int" c:type="int"/>
         </return-value>
       </method>
       <field name="parent_instance">
-        <type name="TestObj" c:type="TestObj"/>
+        <type name="TestObj" c:type="RegressTestObj"/>
       </field>
     </class>
     <record name="TestSubObjClass"
-            c:type="TestSubObjClass"
+            c:type="RegressTestSubObjClass"
             glib:is-gtype-struct-for="TestSubObj">
       <field name="parent_class">
-        <type name="TestObjClass" c:type="TestObjClass"/>
+        <type name="TestObjClass" c:type="RegressTestObjClass"/>
       </field>
     </record>
     <class name="TestWi8021x"
-           c:type="TestWi8021x"
+           c:type="RegressTestWi8021x"
            parent="GObject.Object"
-           glib:type-name="TestWi8021x"
-           glib:get-type="test_wi_802_1x_get_type"
+           glib:type-name="RegressTestWi8021x"
+           glib:get-type="regress_test_wi_802_1x_get_type"
            glib:type-struct="TestWi8021xClass">
-      <constructor name="new" c:identifier="test_wi_802_1x_new">
+      <constructor name="new" c:identifier="regress_test_wi_802_1x_new">
         <return-value transfer-ownership="full">
-          <type name="TestWi8021x" c:type="TestWi8021x*"/>
+          <type name="TestWi8021x" c:type="RegressTestWi8021x*"/>
         </return-value>
       </constructor>
       <function name="static_method"
-                c:identifier="test_wi_802_1x_static_method">
+                c:identifier="regress_test_wi_802_1x_static_method">
         <return-value transfer-ownership="none">
           <type name="int" c:type="int"/>
         </return-value>
@@ -737,12 +757,14 @@ case.</doc>
           </parameter>
         </parameters>
       </function>
-      <method name="get_testbool" c:identifier="test_wi_802_1x_get_testbool">
+      <method name="get_testbool"
+              c:identifier="regress_test_wi_802_1x_get_testbool">
         <return-value transfer-ownership="none">
           <type name="boolean" c:type="gboolean"/>
         </return-value>
       </method>
-      <method name="set_testbool" c:identifier="test_wi_802_1x_set_testbool">
+      <method name="set_testbool"
+              c:identifier="regress_test_wi_802_1x_set_testbool">
         <return-value transfer-ownership="none">
           <type name="none" c:type="void"/>
         </return-value>
@@ -763,13 +785,14 @@ case.</doc>
       </field>
     </class>
     <record name="TestWi8021xClass"
-            c:type="TestWi8021xClass"
+            c:type="RegressTestWi8021xClass"
             glib:is-gtype-struct-for="TestWi8021x">
       <field name="parent_class">
         <type name="GObject.ObjectClass" c:type="GObjectClass"/>
       </field>
     </record>
-    <function name="set_abort_on_error" c:identifier="set_abort_on_error">
+    <function name="set_abort_on_error"
+              c:identifier="regress_set_abort_on_error">
       <return-value transfer-ownership="none">
         <type name="none" c:type="void"/>
       </return-value>
@@ -780,7 +803,7 @@ case.</doc>
       </parameters>
     </function>
     <function name="test_array_fixed_size_int_in"
-              c:identifier="test_array_fixed_size_int_in">
+              c:identifier="regress_test_array_fixed_size_int_in">
       <return-value transfer-ownership="none">
         <doc xml:whitespace="preserve">the sum of the items in @ints</doc>
         <type name="int" c:type="int"/>
@@ -795,7 +818,7 @@ case.</doc>
       </parameters>
     </function>
     <function name="test_array_fixed_size_int_out"
-              c:identifier="test_array_fixed_size_int_out">
+              c:identifier="regress_test_array_fixed_size_int_out">
       <return-value transfer-ownership="none">
         <type name="none" c:type="void"/>
       </return-value>
@@ -812,7 +835,7 @@ case.</doc>
       </parameters>
     </function>
     <function name="test_array_fixed_size_int_return"
-              c:identifier="test_array_fixed_size_int_return">
+              c:identifier="regress_test_array_fixed_size_int_return">
       <return-value transfer-ownership="full">
         <doc xml:whitespace="preserve">a list of 5 integers ranging from 0 to 4</doc>
         <array c:type="int*" fixed-size="5">
@@ -820,7 +843,8 @@ case.</doc>
         </array>
       </return-value>
     </function>
-    <function name="test_array_gint16_in" c:identifier="test_array_gint16_in">
+    <function name="test_array_gint16_in"
+              c:identifier="regress_test_array_gint16_in">
       <return-value transfer-ownership="none">
         <type name="int" c:type="int"/>
       </return-value>
@@ -836,7 +860,8 @@ case.</doc>
         </parameter>
       </parameters>
     </function>
-    <function name="test_array_gint32_in" c:identifier="test_array_gint32_in">
+    <function name="test_array_gint32_in"
+              c:identifier="regress_test_array_gint32_in">
       <return-value transfer-ownership="none">
         <type name="int32" c:type="gint32"/>
       </return-value>
@@ -852,7 +877,8 @@ case.</doc>
         </parameter>
       </parameters>
     </function>
-    <function name="test_array_gint64_in" c:identifier="test_array_gint64_in">
+    <function name="test_array_gint64_in"
+              c:identifier="regress_test_array_gint64_in">
       <return-value transfer-ownership="none">
         <type name="int64" c:type="gint64"/>
       </return-value>
@@ -868,7 +894,8 @@ case.</doc>
         </parameter>
       </parameters>
     </function>
-    <function name="test_array_gint8_in" c:identifier="test_array_gint8_in">
+    <function name="test_array_gint8_in"
+              c:identifier="regress_test_array_gint8_in">
       <return-value transfer-ownership="none">
         <type name="int" c:type="int"/>
       </return-value>
@@ -884,7 +911,8 @@ case.</doc>
         </parameter>
       </parameters>
     </function>
-    <function name="test_array_gtype_in" c:identifier="test_array_gtype_in">
+    <function name="test_array_gtype_in"
+              c:identifier="regress_test_array_gtype_in">
       <return-value transfer-ownership="full">
         <doc xml:whitespace="preserve">string representation of provided types</doc>
         <type name="utf8" c:type="char*"/>
@@ -902,7 +930,7 @@ case.</doc>
       </parameters>
     </function>
     <function name="test_array_int_full_out"
-              c:identifier="test_array_int_full_out">
+              c:identifier="regress_test_array_int_full_out">
       <return-value transfer-ownership="full">
         <doc xml:whitespace="preserve">a new array of integers.</doc>
         <array length="0" c:type="int*">
@@ -919,7 +947,8 @@ case.</doc>
         </parameter>
       </parameters>
     </function>
-    <function name="test_array_int_in" c:identifier="test_array_int_in">
+    <function name="test_array_int_in"
+              c:identifier="regress_test_array_int_in">
       <return-value transfer-ownership="none">
         <type name="int" c:type="int"/>
       </return-value>
@@ -936,7 +965,7 @@ case.</doc>
       </parameters>
     </function>
     <function name="test_array_int_in_take"
-              c:identifier="test_array_int_in_take">
+              c:identifier="regress_test_array_int_in_take">
       <return-value transfer-ownership="none">
         <type name="int" c:type="int"/>
       </return-value>
@@ -952,7 +981,8 @@ case.</doc>
         </parameter>
       </parameters>
     </function>
-    <function name="test_array_int_inout" c:identifier="test_array_int_inout">
+    <function name="test_array_int_inout"
+              c:identifier="regress_test_array_int_inout">
       <return-value transfer-ownership="none">
         <type name="none" c:type="void"/>
       </return-value>
@@ -976,7 +1006,7 @@ case.</doc>
       </parameters>
     </function>
     <function name="test_array_int_none_out"
-              c:identifier="test_array_int_none_out">
+              c:identifier="regress_test_array_int_none_out">
       <return-value transfer-ownership="none">
         <doc xml:whitespace="preserve">a static array of integers.</doc>
         <array length="0" c:type="int*">
@@ -994,7 +1024,7 @@ case.</doc>
       </parameters>
     </function>
     <function name="test_array_int_null_in"
-              c:identifier="test_array_int_null_in">
+              c:identifier="regress_test_array_int_null_in">
       <return-value transfer-ownership="none">
         <type name="none" c:type="void"/>
       </return-value>
@@ -1011,7 +1041,7 @@ case.</doc>
       </parameters>
     </function>
     <function name="test_array_int_null_out"
-              c:identifier="test_array_int_null_out">
+              c:identifier="regress_test_array_int_null_out">
       <return-value transfer-ownership="none">
         <type name="none" c:type="void"/>
       </return-value>
@@ -1034,7 +1064,8 @@ case.</doc>
         </parameter>
       </parameters>
     </function>
-    <function name="test_array_int_out" c:identifier="test_array_int_out">
+    <function name="test_array_int_out"
+              c:identifier="regress_test_array_int_out">
       <return-value transfer-ownership="none">
         <type name="none" c:type="void"/>
       </return-value>
@@ -1058,7 +1089,7 @@ case.</doc>
       </parameters>
     </function>
     <function name="test_async_ready_callback"
-              c:identifier="test_async_ready_callback">
+              c:identifier="regress_test_async_ready_callback">
       <return-value transfer-ownership="none">
         <type name="none" c:type="void"/>
       </return-value>
@@ -1068,7 +1099,7 @@ case.</doc>
         </parameter>
       </parameters>
     </function>
-    <function name="test_boolean" c:identifier="test_boolean">
+    <function name="test_boolean" c:identifier="regress_test_boolean">
       <return-value transfer-ownership="none">
         <type name="boolean" c:type="gboolean"/>
       </return-value>
@@ -1078,7 +1109,8 @@ case.</doc>
         </parameter>
       </parameters>
     </function>
-    <function name="test_boolean_false" c:identifier="test_boolean_false">
+    <function name="test_boolean_false"
+              c:identifier="regress_test_boolean_false">
       <return-value transfer-ownership="none">
         <type name="boolean" c:type="gboolean"/>
       </return-value>
@@ -1088,7 +1120,8 @@ case.</doc>
         </parameter>
       </parameters>
     </function>
-    <function name="test_boolean_true" c:identifier="test_boolean_true">
+    <function name="test_boolean_true"
+              c:identifier="regress_test_boolean_true">
       <return-value transfer-ownership="none">
         <type name="boolean" c:type="gboolean"/>
       </return-value>
@@ -1099,13 +1132,13 @@ case.</doc>
       </parameters>
     </function>
     <function name="test_cairo_context_full_return"
-              c:identifier="test_cairo_context_full_return">
+              c:identifier="regress_test_cairo_context_full_return">
       <return-value transfer-ownership="full">
         <type name="cairo.Context" c:type="cairo_t*"/>
       </return-value>
     </function>
     <function name="test_cairo_context_none_in"
-              c:identifier="test_cairo_context_none_in">
+              c:identifier="regress_test_cairo_context_none_in">
       <return-value transfer-ownership="none">
         <type name="none" c:type="void"/>
       </return-value>
@@ -1116,7 +1149,7 @@ case.</doc>
       </parameters>
     </function>
     <function name="test_cairo_surface_full_out"
-              c:identifier="test_cairo_surface_full_out">
+              c:identifier="regress_test_cairo_surface_full_out">
       <return-value transfer-ownership="none">
         <type name="none" c:type="void"/>
       </return-value>
@@ -1130,13 +1163,13 @@ case.</doc>
       </parameters>
     </function>
     <function name="test_cairo_surface_full_return"
-              c:identifier="test_cairo_surface_full_return">
+              c:identifier="regress_test_cairo_surface_full_return">
       <return-value transfer-ownership="full">
         <type name="cairo.Surface" c:type="cairo_surface_t*"/>
       </return-value>
     </function>
     <function name="test_cairo_surface_none_in"
-              c:identifier="test_cairo_surface_none_in">
+              c:identifier="regress_test_cairo_surface_none_in">
       <return-value transfer-ownership="none">
         <type name="none" c:type="void"/>
       </return-value>
@@ -1147,12 +1180,12 @@ case.</doc>
       </parameters>
     </function>
     <function name="test_cairo_surface_none_return"
-              c:identifier="test_cairo_surface_none_return">
+              c:identifier="regress_test_cairo_surface_none_return">
       <return-value transfer-ownership="none">
         <type name="cairo.Surface" c:type="cairo_surface_t*"/>
       </return-value>
     </function>
-    <function name="test_callback" c:identifier="test_callback">
+    <function name="test_callback" c:identifier="regress_test_callback">
       <return-value transfer-ownership="none">
         <type name="int" c:type="int"/>
       </return-value>
@@ -1161,11 +1194,12 @@ case.</doc>
                    transfer-ownership="none"
                    allow-none="1"
                    scope="call">
-          <type name="TestCallback" c:type="TestCallback"/>
+          <type name="TestCallback" c:type="RegressTestCallback"/>
         </parameter>
       </parameters>
     </function>
-    <function name="test_callback_async" c:identifier="test_callback_async">
+    <function name="test_callback_async"
+              c:identifier="regress_test_callback_async">
       <return-value transfer-ownership="none">
         <type name="none" c:type="void"/>
       </return-value>
@@ -1174,7 +1208,8 @@ case.</doc>
                    transfer-ownership="none"
                    scope="async"
                    closure="1">
-          <type name="TestCallbackUserData" c:type="TestCallbackUserData"/>
+          <type name="TestCallbackUserData"
+                c:type="RegressTestCallbackUserData"/>
         </parameter>
         <parameter name="user_data" transfer-ownership="none">
           <type name="any" c:type="gpointer"/>
@@ -1182,7 +1217,7 @@ case.</doc>
       </parameters>
     </function>
     <function name="test_callback_destroy_notify"
-              c:identifier="test_callback_destroy_notify">
+              c:identifier="regress_test_callback_destroy_notify">
       <doc xml:whitespace="preserve">Notified - callback persists until a DestroyNotify delegate
 is invoked.</doc>
       <return-value transfer-ownership="none">
@@ -1194,7 +1229,8 @@ is invoked.</doc>
                    scope="notified"
                    closure="1"
                    destroy="2">
-          <type name="TestCallbackUserData" c:type="TestCallbackUserData"/>
+          <type name="TestCallbackUserData"
+                c:type="RegressTestCallbackUserData"/>
         </parameter>
         <parameter name="user_data" transfer-ownership="none">
           <type name="any" c:type="gpointer"/>
@@ -1205,13 +1241,13 @@ is invoked.</doc>
       </parameters>
     </function>
     <function name="test_callback_thaw_async"
-              c:identifier="test_callback_thaw_async">
+              c:identifier="regress_test_callback_thaw_async">
       <return-value transfer-ownership="none">
         <type name="int" c:type="int"/>
       </return-value>
     </function>
     <function name="test_callback_thaw_notifications"
-              c:identifier="test_callback_thaw_notifications">
+              c:identifier="regress_test_callback_thaw_notifications">
       <doc xml:whitespace="preserve">Invokes all callbacks installed by #test_callback_destroy_notify(),
 adding up their return values, and removes them, invoking the
 corresponding destroy notfications.</doc>
@@ -1221,7 +1257,7 @@ corresponding destroy notfications.</doc>
       </return-value>
     </function>
     <function name="test_callback_user_data"
-              c:identifier="test_callback_user_data">
+              c:identifier="regress_test_callback_user_data">
       <doc xml:whitespace="preserve">Call - callback parameter persists for the duration of the method
 call and can be released on return.</doc>
       <return-value transfer-ownership="none">
@@ -1232,14 +1268,15 @@ call and can be released on return.</doc>
                    transfer-ownership="none"
                    scope="call"
                    closure="1">
-          <type name="TestCallbackUserData" c:type="TestCallbackUserData"/>
+          <type name="TestCallbackUserData"
+                c:type="RegressTestCallbackUserData"/>
         </parameter>
         <parameter name="user_data" transfer-ownership="none">
           <type name="any" c:type="gpointer"/>
         </parameter>
       </parameters>
     </function>
-    <function name="test_closure" c:identifier="test_closure">
+    <function name="test_closure" c:identifier="regress_test_closure">
       <return-value transfer-ownership="none">
         <type name="int" c:type="int"/>
       </return-value>
@@ -1249,7 +1286,8 @@ call and can be released on return.</doc>
         </parameter>
       </parameters>
     </function>
-    <function name="test_closure_one_arg" c:identifier="test_closure_one_arg">
+    <function name="test_closure_one_arg"
+              c:identifier="regress_test_closure_one_arg">
       <return-value transfer-ownership="none">
         <type name="int" c:type="int"/>
       </return-value>
@@ -1262,12 +1300,13 @@ call and can be released on return.</doc>
         </parameter>
       </parameters>
     </function>
-    <function name="test_date_in_gvalue" c:identifier="test_date_in_gvalue">
+    <function name="test_date_in_gvalue"
+              c:identifier="regress_test_date_in_gvalue">
       <return-value transfer-ownership="full">
         <type name="GObject.Value" c:type="GValue*"/>
       </return-value>
     </function>
-    <function name="test_double" c:identifier="test_double">
+    <function name="test_double" c:identifier="regress_test_double">
       <return-value transfer-ownership="none">
         <type name="double" c:type="gdouble"/>
       </return-value>
@@ -1277,17 +1316,18 @@ call and can be released on return.</doc>
         </parameter>
       </parameters>
     </function>
-    <function name="test_enum_param" c:identifier="test_enum_param">
+    <function name="test_enum_param" c:identifier="regress_test_enum_param">
       <return-value transfer-ownership="none">
         <type name="utf8" c:type="gchar*"/>
       </return-value>
       <parameters>
         <parameter name="e" transfer-ownership="none">
-          <type name="TestEnum" c:type="TestEnum"/>
+          <type name="TestEnum" c:type="RegressTestEnum"/>
         </parameter>
       </parameters>
     </function>
-    <function name="test_filename_return" c:identifier="test_filename_return">
+    <function name="test_filename_return"
+              c:identifier="regress_test_filename_return">
       <return-value transfer-ownership="full">
         <doc xml:whitespace="preserve">list of strings</doc>
         <type name="GLib.SList" c:type="GSList*">
@@ -1295,7 +1335,7 @@ call and can be released on return.</doc>
         </type>
       </return-value>
     </function>
-    <function name="test_float" c:identifier="test_float">
+    <function name="test_float" c:identifier="regress_test_float">
       <return-value transfer-ownership="none">
         <type name="float" c:type="gfloat"/>
       </return-value>
@@ -1306,7 +1346,7 @@ call and can be released on return.</doc>
       </parameters>
     </function>
     <function name="test_ghash_container_in"
-              c:identifier="test_ghash_container_in">
+              c:identifier="regress_test_ghash_container_in">
       <return-value transfer-ownership="none">
         <type name="none" c:type="void"/>
       </return-value>
@@ -1320,7 +1360,7 @@ call and can be released on return.</doc>
       </parameters>
     </function>
     <function name="test_ghash_container_return"
-              c:identifier="test_ghash_container_return">
+              c:identifier="regress_test_ghash_container_return">
       <return-value transfer-ownership="container">
         <type name="GLib.HashTable" c:type="GHashTable*">
           <type name="utf8"/>
@@ -1329,7 +1369,7 @@ call and can be released on return.</doc>
       </return-value>
     </function>
     <function name="test_ghash_everything_in"
-              c:identifier="test_ghash_everything_in">
+              c:identifier="regress_test_ghash_everything_in">
       <return-value transfer-ownership="none">
         <type name="none" c:type="void"/>
       </return-value>
@@ -1343,7 +1383,7 @@ call and can be released on return.</doc>
       </parameters>
     </function>
     <function name="test_ghash_everything_return"
-              c:identifier="test_ghash_everything_return">
+              c:identifier="regress_test_ghash_everything_return">
       <return-value transfer-ownership="full">
         <type name="GLib.HashTable" c:type="GHashTable*">
           <type name="utf8"/>
@@ -1351,7 +1391,7 @@ call and can be released on return.</doc>
         </type>
       </return-value>
     </function>
-    <function name="test_ghash_free" c:identifier="test_ghash_free">
+    <function name="test_ghash_free" c:identifier="regress_test_ghash_free">
       <return-value transfer-ownership="none">
         <type name="none" c:type="void"/>
       </return-value>
@@ -1365,7 +1405,7 @@ call and can be released on return.</doc>
       </parameters>
     </function>
     <function name="test_ghash_nested_everything_return"
-              c:identifier="test_ghash_nested_everything_return">
+              c:identifier="regress_test_ghash_nested_everything_return">
       <doc xml:whitespace="preserve">Specify nested parameterized types directly with the (type ) annotation.</doc>
       <return-value transfer-ownership="full">
         <type name="GLib.HashTable" c:type="GHashTable*">
@@ -1378,7 +1418,7 @@ call and can be released on return.</doc>
       </return-value>
     </function>
     <function name="test_ghash_nested_everything_return2"
-              c:identifier="test_ghash_nested_everything_return2">
+              c:identifier="regress_test_ghash_nested_everything_return2">
       <doc xml:whitespace="preserve">element-type annotation.</doc>
       <return-value transfer-ownership="full">
         <type name="GLib.HashTable" c:type="GHashTable*">
@@ -1391,7 +1431,7 @@ call and can be released on return.</doc>
       </return-value>
     </function>
     <function name="test_ghash_nothing_in"
-              c:identifier="test_ghash_nothing_in">
+              c:identifier="regress_test_ghash_nothing_in">
       <return-value transfer-ownership="none">
         <type name="none" c:type="void"/>
       </return-value>
@@ -1405,7 +1445,7 @@ call and can be released on return.</doc>
       </parameters>
     </function>
     <function name="test_ghash_nothing_in2"
-              c:identifier="test_ghash_nothing_in2">
+              c:identifier="regress_test_ghash_nothing_in2">
       <return-value transfer-ownership="none">
         <type name="none" c:type="void"/>
       </return-value>
@@ -1419,7 +1459,7 @@ call and can be released on return.</doc>
       </parameters>
     </function>
     <function name="test_ghash_nothing_return"
-              c:identifier="test_ghash_nothing_return">
+              c:identifier="regress_test_ghash_nothing_return">
       <return-value transfer-ownership="none">
         <type name="GLib.HashTable" c:type="GHashTable*">
           <type name="utf8"/>
@@ -1428,7 +1468,7 @@ call and can be released on return.</doc>
       </return-value>
     </function>
     <function name="test_ghash_nothing_return2"
-              c:identifier="test_ghash_nothing_return2">
+              c:identifier="regress_test_ghash_nothing_return2">
       <return-value transfer-ownership="none">
         <type name="GLib.HashTable" c:type="GHashTable*">
           <type name="utf8"/>
@@ -1436,7 +1476,8 @@ call and can be released on return.</doc>
         </type>
       </return-value>
     </function>
-    <function name="test_ghash_null_in" c:identifier="test_ghash_null_in">
+    <function name="test_ghash_null_in"
+              c:identifier="regress_test_ghash_null_in">
       <return-value transfer-ownership="none">
         <type name="none" c:type="void"/>
       </return-value>
@@ -1449,7 +1490,8 @@ call and can be released on return.</doc>
         </parameter>
       </parameters>
     </function>
-    <function name="test_ghash_null_out" c:identifier="test_ghash_null_out">
+    <function name="test_ghash_null_out"
+              c:identifier="regress_test_ghash_null_out">
       <return-value transfer-ownership="none">
         <type name="none" c:type="void"/>
       </return-value>
@@ -1467,7 +1509,7 @@ call and can be released on return.</doc>
       </parameters>
     </function>
     <function name="test_ghash_null_return"
-              c:identifier="test_ghash_null_return">
+              c:identifier="regress_test_ghash_null_return">
       <return-value transfer-ownership="none">
         <type name="GLib.HashTable" c:type="GHashTable*">
           <type name="utf8"/>
@@ -1476,7 +1518,7 @@ call and can be released on return.</doc>
       </return-value>
     </function>
     <function name="test_glist_container_in"
-              c:identifier="test_glist_container_in">
+              c:identifier="regress_test_glist_container_in">
       <return-value transfer-ownership="none">
         <type name="none" c:type="void"/>
       </return-value>
@@ -1489,7 +1531,7 @@ call and can be released on return.</doc>
       </parameters>
     </function>
     <function name="test_glist_container_return"
-              c:identifier="test_glist_container_return">
+              c:identifier="regress_test_glist_container_return">
       <return-value transfer-ownership="container">
         <type name="GLib.List" c:type="GList*">
           <type name="utf8"/>
@@ -1497,7 +1539,7 @@ call and can be released on return.</doc>
       </return-value>
     </function>
     <function name="test_glist_everything_in"
-              c:identifier="test_glist_everything_in">
+              c:identifier="regress_test_glist_everything_in">
       <return-value transfer-ownership="none">
         <type name="none" c:type="void"/>
       </return-value>
@@ -1510,14 +1552,14 @@ call and can be released on return.</doc>
       </parameters>
     </function>
     <function name="test_glist_everything_return"
-              c:identifier="test_glist_everything_return">
+              c:identifier="regress_test_glist_everything_return">
       <return-value transfer-ownership="full">
         <type name="GLib.List" c:type="GList*">
           <type name="utf8"/>
         </type>
       </return-value>
     </function>
-    <function name="test_glist_free" c:identifier="test_glist_free">
+    <function name="test_glist_free" c:identifier="regress_test_glist_free">
       <return-value transfer-ownership="none">
         <type name="none" c:type="void"/>
       </return-value>
@@ -1530,7 +1572,7 @@ call and can be released on return.</doc>
       </parameters>
     </function>
     <function name="test_glist_nothing_in"
-              c:identifier="test_glist_nothing_in">
+              c:identifier="regress_test_glist_nothing_in">
       <return-value transfer-ownership="none">
         <type name="none" c:type="void"/>
       </return-value>
@@ -1543,7 +1585,7 @@ call and can be released on return.</doc>
       </parameters>
     </function>
     <function name="test_glist_nothing_in2"
-              c:identifier="test_glist_nothing_in2">
+              c:identifier="regress_test_glist_nothing_in2">
       <return-value transfer-ownership="none">
         <type name="none" c:type="void"/>
       </return-value>
@@ -1556,7 +1598,7 @@ call and can be released on return.</doc>
       </parameters>
     </function>
     <function name="test_glist_nothing_return"
-              c:identifier="test_glist_nothing_return">
+              c:identifier="regress_test_glist_nothing_return">
       <return-value transfer-ownership="none">
         <type name="GLib.List" c:type="GList*">
           <type name="utf8"/>
@@ -1564,14 +1606,15 @@ call and can be released on return.</doc>
       </return-value>
     </function>
     <function name="test_glist_nothing_return2"
-              c:identifier="test_glist_nothing_return2">
+              c:identifier="regress_test_glist_nothing_return2">
       <return-value transfer-ownership="none">
         <type name="GLib.List" c:type="GList*">
           <type name="utf8"/>
         </type>
       </return-value>
     </function>
-    <function name="test_glist_null_in" c:identifier="test_glist_null_in">
+    <function name="test_glist_null_in"
+              c:identifier="regress_test_glist_null_in">
       <return-value transfer-ownership="none">
         <type name="none" c:type="void"/>
       </return-value>
@@ -1583,7 +1626,8 @@ call and can be released on return.</doc>
         </parameter>
       </parameters>
     </function>
-    <function name="test_glist_null_out" c:identifier="test_glist_null_out">
+    <function name="test_glist_null_out"
+              c:identifier="regress_test_glist_null_out">
       <return-value transfer-ownership="none">
         <type name="none" c:type="void"/>
       </return-value>
@@ -1600,7 +1644,7 @@ call and can be released on return.</doc>
       </parameters>
     </function>
     <function name="test_gslist_container_in"
-              c:identifier="test_gslist_container_in">
+              c:identifier="regress_test_gslist_container_in">
       <return-value transfer-ownership="none">
         <type name="none" c:type="void"/>
       </return-value>
@@ -1613,7 +1657,7 @@ call and can be released on return.</doc>
       </parameters>
     </function>
     <function name="test_gslist_container_return"
-              c:identifier="test_gslist_container_return">
+              c:identifier="regress_test_gslist_container_return">
       <return-value transfer-ownership="container">
         <type name="GLib.SList" c:type="GSList*">
           <type name="utf8"/>
@@ -1621,7 +1665,7 @@ call and can be released on return.</doc>
       </return-value>
     </function>
     <function name="test_gslist_everything_in"
-              c:identifier="test_gslist_everything_in">
+              c:identifier="regress_test_gslist_everything_in">
       <return-value transfer-ownership="none">
         <type name="none" c:type="void"/>
       </return-value>
@@ -1634,14 +1678,14 @@ call and can be released on return.</doc>
       </parameters>
     </function>
     <function name="test_gslist_everything_return"
-              c:identifier="test_gslist_everything_return">
+              c:identifier="regress_test_gslist_everything_return">
       <return-value transfer-ownership="full">
         <type name="GLib.SList" c:type="GSList*">
           <type name="utf8"/>
         </type>
       </return-value>
     </function>
-    <function name="test_gslist_free" c:identifier="test_gslist_free">
+    <function name="test_gslist_free" c:identifier="regress_test_gslist_free">
       <return-value transfer-ownership="none">
         <type name="none" c:type="void"/>
       </return-value>
@@ -1654,7 +1698,7 @@ call and can be released on return.</doc>
       </parameters>
     </function>
     <function name="test_gslist_nothing_in"
-              c:identifier="test_gslist_nothing_in">
+              c:identifier="regress_test_gslist_nothing_in">
       <return-value transfer-ownership="none">
         <type name="none" c:type="void"/>
       </return-value>
@@ -1667,7 +1711,7 @@ call and can be released on return.</doc>
       </parameters>
     </function>
     <function name="test_gslist_nothing_in2"
-              c:identifier="test_gslist_nothing_in2">
+              c:identifier="regress_test_gslist_nothing_in2">
       <return-value transfer-ownership="none">
         <type name="none" c:type="void"/>
       </return-value>
@@ -1680,7 +1724,7 @@ call and can be released on return.</doc>
       </parameters>
     </function>
     <function name="test_gslist_nothing_return"
-              c:identifier="test_gslist_nothing_return">
+              c:identifier="regress_test_gslist_nothing_return">
       <return-value transfer-ownership="none">
         <type name="GLib.SList" c:type="GSList*">
           <type name="utf8"/>
@@ -1688,14 +1732,15 @@ call and can be released on return.</doc>
       </return-value>
     </function>
     <function name="test_gslist_nothing_return2"
-              c:identifier="test_gslist_nothing_return2">
+              c:identifier="regress_test_gslist_nothing_return2">
       <return-value transfer-ownership="none">
         <type name="GLib.SList" c:type="GSList*">
           <type name="utf8"/>
         </type>
       </return-value>
     </function>
-    <function name="test_gslist_null_in" c:identifier="test_gslist_null_in">
+    <function name="test_gslist_null_in"
+              c:identifier="regress_test_gslist_null_in">
       <return-value transfer-ownership="none">
         <type name="none" c:type="void"/>
       </return-value>
@@ -1707,7 +1752,8 @@ call and can be released on return.</doc>
         </parameter>
       </parameters>
     </function>
-    <function name="test_gslist_null_out" c:identifier="test_gslist_null_out">
+    <function name="test_gslist_null_out"
+              c:identifier="regress_test_gslist_null_out">
       <return-value transfer-ownership="none">
         <type name="none" c:type="void"/>
       </return-value>
@@ -1723,7 +1769,7 @@ call and can be released on return.</doc>
         </parameter>
       </parameters>
     </function>
-    <function name="test_gtype" c:identifier="test_gtype">
+    <function name="test_gtype" c:identifier="regress_test_gtype">
       <return-value transfer-ownership="none">
         <type name="GType" c:type="GType"/>
       </return-value>
@@ -1733,7 +1779,7 @@ call and can be released on return.</doc>
         </parameter>
       </parameters>
     </function>
-    <function name="test_int" c:identifier="test_int">
+    <function name="test_int" c:identifier="regress_test_int">
       <return-value transfer-ownership="none">
         <type name="int" c:type="gint"/>
       </return-value>
@@ -1743,7 +1789,7 @@ call and can be released on return.</doc>
         </parameter>
       </parameters>
     </function>
-    <function name="test_int16" c:identifier="test_int16">
+    <function name="test_int16" c:identifier="regress_test_int16">
       <return-value transfer-ownership="none">
         <type name="int16" c:type="gint16"/>
       </return-value>
@@ -1753,7 +1799,7 @@ call and can be released on return.</doc>
         </parameter>
       </parameters>
     </function>
-    <function name="test_int32" c:identifier="test_int32">
+    <function name="test_int32" c:identifier="regress_test_int32">
       <return-value transfer-ownership="none">
         <type name="int32" c:type="gint32"/>
       </return-value>
@@ -1763,7 +1809,7 @@ call and can be released on return.</doc>
         </parameter>
       </parameters>
     </function>
-    <function name="test_int64" c:identifier="test_int64">
+    <function name="test_int64" c:identifier="regress_test_int64">
       <return-value transfer-ownership="none">
         <type name="int64" c:type="gint64"/>
       </return-value>
@@ -1773,7 +1819,7 @@ call and can be released on return.</doc>
         </parameter>
       </parameters>
     </function>
-    <function name="test_int8" c:identifier="test_int8">
+    <function name="test_int8" c:identifier="regress_test_int8">
       <return-value transfer-ownership="none">
         <type name="int8" c:type="gint8"/>
       </return-value>
@@ -1783,7 +1829,8 @@ call and can be released on return.</doc>
         </parameter>
       </parameters>
     </function>
-    <function name="test_int_out_utf8" c:identifier="test_int_out_utf8">
+    <function name="test_int_out_utf8"
+              c:identifier="regress_test_int_out_utf8">
       <return-value transfer-ownership="none">
         <type name="none" c:type="void"/>
       </return-value>
@@ -1799,7 +1846,8 @@ call and can be released on return.</doc>
         </parameter>
       </parameters>
     </function>
-    <function name="test_int_value_arg" c:identifier="test_int_value_arg">
+    <function name="test_int_value_arg"
+              c:identifier="regress_test_int_value_arg">
       <return-value transfer-ownership="none">
         <type name="int" c:type="int"/>
       </return-value>
@@ -1809,7 +1857,7 @@ call and can be released on return.</doc>
         </parameter>
       </parameters>
     </function>
-    <function name="test_long" c:identifier="test_long">
+    <function name="test_long" c:identifier="regress_test_long">
       <return-value transfer-ownership="none">
         <type name="long" c:type="glong"/>
       </return-value>
@@ -1819,7 +1867,8 @@ call and can be released on return.</doc>
         </parameter>
       </parameters>
     </function>
-    <function name="test_multi_callback" c:identifier="test_multi_callback">
+    <function name="test_multi_callback"
+              c:identifier="regress_test_multi_callback">
       <return-value transfer-ownership="none">
         <type name="int" c:type="int"/>
       </return-value>
@@ -1828,12 +1877,12 @@ call and can be released on return.</doc>
                    transfer-ownership="none"
                    allow-none="1"
                    scope="call">
-          <type name="TestCallback" c:type="TestCallback"/>
+          <type name="TestCallback" c:type="RegressTestCallback"/>
         </parameter>
       </parameters>
     </function>
     <function name="test_multi_double_args"
-              c:identifier="test_multi_double_args">
+              c:identifier="regress_test_multi_double_args">
       <return-value transfer-ownership="none">
         <type name="none" c:type="void"/>
       </return-value>
@@ -1855,33 +1904,7 @@ call and can be released on return.</doc>
         </parameter>
       </parameters>
     </function>
-    <function name="test_object_null_in" c:identifier="test_object_null_in">
-      <return-value transfer-ownership="none">
-        <type name="none" c:type="void"/>
-      </return-value>
-      <parameters>
-        <parameter name="obj" transfer-ownership="none" allow-none="1">
-          <doc xml:whitespace="preserve">A #TestObj</doc>
-          <type name="TestObj" c:type="TestObj*"/>
-        </parameter>
-      </parameters>
-    </function>
-    <function name="test_object_null_out" c:identifier="test_object_null_out">
-      <return-value transfer-ownership="none">
-        <type name="none" c:type="void"/>
-      </return-value>
-      <parameters>
-        <parameter name="obj"
-                   direction="out"
-                   caller-allocates="0"
-                   transfer-ownership="full"
-                   allow-none="1">
-          <doc xml:whitespace="preserve">A #TestObj</doc>
-          <type name="TestObj" c:type="TestObj**"/>
-        </parameter>
-      </parameters>
-    </function>
-    <function name="test_short" c:identifier="test_short">
+    <function name="test_short" c:identifier="regress_test_short">
       <return-value transfer-ownership="none">
         <type name="short" c:type="gshort"/>
       </return-value>
@@ -1892,12 +1915,13 @@ call and can be released on return.</doc>
       </parameters>
     </function>
     <function name="test_simple_boxed_a_const_return"
-              c:identifier="test_simple_boxed_a_const_return">
+              c:identifier="regress_test_simple_boxed_a_const_return">
       <return-value transfer-ownership="none">
-        <type name="TestSimpleBoxedA" c:type="TestSimpleBoxedA*"/>
+        <type name="TestSimpleBoxedA" c:type="RegressTestSimpleBoxedA*"/>
       </return-value>
     </function>
-    <function name="test_simple_callback" c:identifier="test_simple_callback">
+    <function name="test_simple_callback"
+              c:identifier="regress_test_simple_callback">
       <return-value transfer-ownership="none">
         <type name="none" c:type="void"/>
       </return-value>
@@ -1906,11 +1930,11 @@ call and can be released on return.</doc>
                    transfer-ownership="none"
                    allow-none="1"
                    scope="call">
-          <type name="TestSimpleCallback" c:type="TestSimpleCallback"/>
+          <type name="TestSimpleCallback" c:type="RegressTestSimpleCallback"/>
         </parameter>
       </parameters>
     </function>
-    <function name="test_size" c:identifier="test_size">
+    <function name="test_size" c:identifier="regress_test_size">
       <return-value transfer-ownership="none">
         <type name="gsize" c:type="gsize"/>
       </return-value>
@@ -1920,7 +1944,7 @@ call and can be released on return.</doc>
         </parameter>
       </parameters>
     </function>
-    <function name="test_ssize" c:identifier="test_ssize">
+    <function name="test_ssize" c:identifier="regress_test_ssize">
       <return-value transfer-ownership="none">
         <type name="gssize" c:type="gssize"/>
       </return-value>
@@ -1930,7 +1954,7 @@ call and can be released on return.</doc>
         </parameter>
       </parameters>
     </function>
-    <function name="test_strv_in" c:identifier="test_strv_in">
+    <function name="test_strv_in" c:identifier="regress_test_strv_in">
       <return-value transfer-ownership="none">
         <type name="boolean" c:type="gboolean"/>
       </return-value>
@@ -1943,7 +1967,7 @@ call and can be released on return.</doc>
       </parameters>
     </function>
     <function name="test_strv_in_container"
-              c:identifier="test_strv_in_container">
+              c:identifier="regress_test_strv_in_container">
       <return-value transfer-ownership="none">
         <type name="boolean" c:type="gboolean"/>
       </return-value>
@@ -1955,12 +1979,13 @@ call and can be released on return.</doc>
         </parameter>
       </parameters>
     </function>
-    <function name="test_strv_in_gvalue" c:identifier="test_strv_in_gvalue">
+    <function name="test_strv_in_gvalue"
+              c:identifier="regress_test_strv_in_gvalue">
       <return-value transfer-ownership="full">
         <type name="GObject.Value" c:type="GValue*"/>
       </return-value>
     </function>
-    <function name="test_strv_out" c:identifier="test_strv_out">
+    <function name="test_strv_out" c:identifier="regress_test_strv_out">
       <doc xml:whitespace="preserve">No annotations here.  We want the default to Do The Right Thing.</doc>
       <return-value transfer-ownership="full">
         <array c:type="char**">
@@ -1968,7 +1993,7 @@ call and can be released on return.</doc>
         </array>
       </return-value>
     </function>
-    <function name="test_strv_out_c" c:identifier="test_strv_out_c">
+    <function name="test_strv_out_c" c:identifier="regress_test_strv_out_c">
       <doc xml:whitespace="preserve">No annotations here.  We want the default to Do The Right Thing.</doc>
       <return-value transfer-ownership="full">
         <array c:type="char**">
@@ -1977,14 +2002,14 @@ call and can be released on return.</doc>
       </return-value>
     </function>
     <function name="test_strv_out_container"
-              c:identifier="test_strv_out_container">
+              c:identifier="regress_test_strv_out_container">
       <return-value transfer-ownership="container">
         <array c:type="char**">
           <type name="utf8"/>
         </array>
       </return-value>
     </function>
-    <function name="test_strv_outarg" c:identifier="test_strv_outarg">
+    <function name="test_strv_outarg" c:identifier="regress_test_strv_outarg">
       <return-value transfer-ownership="none">
         <type name="none" c:type="void"/>
       </return-value>
@@ -1999,7 +2024,7 @@ call and can be released on return.</doc>
         </parameter>
       </parameters>
     </function>
-    <function name="test_timet" c:identifier="test_timet">
+    <function name="test_timet" c:identifier="regress_test_timet">
       <return-value transfer-ownership="none">
         <type name="long" c:type="time_t"/>
       </return-value>
@@ -2010,7 +2035,7 @@ call and can be released on return.</doc>
       </parameters>
     </function>
     <function name="test_torture_signature_0"
-              c:identifier="test_torture_signature_0">
+              c:identifier="regress_test_torture_signature_0">
       <return-value transfer-ownership="none">
         <type name="none" c:type="void"/>
       </return-value>
@@ -2045,7 +2070,7 @@ call and can be released on return.</doc>
       </parameters>
     </function>
     <function name="test_torture_signature_1"
-              c:identifier="test_torture_signature_1"
+              c:identifier="regress_test_torture_signature_1"
               throws="1">
       <doc xml:whitespace="preserve">This function throws an error if m is odd.</doc>
       <return-value transfer-ownership="none">
@@ -2082,7 +2107,7 @@ call and can be released on return.</doc>
       </parameters>
     </function>
     <function name="test_torture_signature_2"
-              c:identifier="test_torture_signature_2">
+              c:identifier="regress_test_torture_signature_2">
       <return-value transfer-ownership="none">
         <type name="none" c:type="void"/>
       </return-value>
@@ -2095,7 +2120,8 @@ call and can be released on return.</doc>
                    scope="notified"
                    closure="2"
                    destroy="3">
-          <type name="TestCallbackUserData" c:type="TestCallbackUserData"/>
+          <type name="TestCallbackUserData"
+                c:type="RegressTestCallbackUserData"/>
         </parameter>
         <parameter name="user_data" transfer-ownership="none">
           <type name="any" c:type="gpointer"/>
@@ -2129,7 +2155,7 @@ call and can be released on return.</doc>
         </parameter>
       </parameters>
     </function>
-    <function name="test_uint" c:identifier="test_uint">
+    <function name="test_uint" c:identifier="regress_test_uint">
       <return-value transfer-ownership="none">
         <type name="uint" c:type="guint"/>
       </return-value>
@@ -2139,7 +2165,7 @@ call and can be released on return.</doc>
         </parameter>
       </parameters>
     </function>
-    <function name="test_uint16" c:identifier="test_uint16">
+    <function name="test_uint16" c:identifier="regress_test_uint16">
       <return-value transfer-ownership="none">
         <type name="uint16" c:type="guint16"/>
       </return-value>
@@ -2149,7 +2175,7 @@ call and can be released on return.</doc>
         </parameter>
       </parameters>
     </function>
-    <function name="test_uint32" c:identifier="test_uint32">
+    <function name="test_uint32" c:identifier="regress_test_uint32">
       <return-value transfer-ownership="none">
         <type name="uint32" c:type="guint32"/>
       </return-value>
@@ -2159,7 +2185,7 @@ call and can be released on return.</doc>
         </parameter>
       </parameters>
     </function>
-    <function name="test_uint64" c:identifier="test_uint64">
+    <function name="test_uint64" c:identifier="regress_test_uint64">
       <return-value transfer-ownership="none">
         <type name="uint64" c:type="guint64"/>
       </return-value>
@@ -2169,7 +2195,7 @@ call and can be released on return.</doc>
         </parameter>
       </parameters>
     </function>
-    <function name="test_uint8" c:identifier="test_uint8">
+    <function name="test_uint8" c:identifier="regress_test_uint8">
       <return-value transfer-ownership="none">
         <type name="uint8" c:type="guint8"/>
       </return-value>
@@ -2179,7 +2205,7 @@ call and can be released on return.</doc>
         </parameter>
       </parameters>
     </function>
-    <function name="test_ulong" c:identifier="test_ulong">
+    <function name="test_ulong" c:identifier="regress_test_ulong">
       <return-value transfer-ownership="none">
         <type name="ulong" c:type="gulong"/>
       </return-value>
@@ -2189,7 +2215,7 @@ call and can be released on return.</doc>
         </parameter>
       </parameters>
     </function>
-    <function name="test_ushort" c:identifier="test_ushort">
+    <function name="test_ushort" c:identifier="regress_test_ushort">
       <return-value transfer-ownership="none">
         <type name="ushort" c:type="gushort"/>
       </return-value>
@@ -2199,7 +2225,8 @@ call and can be released on return.</doc>
         </parameter>
       </parameters>
     </function>
-    <function name="test_utf8_const_in" c:identifier="test_utf8_const_in">
+    <function name="test_utf8_const_in"
+              c:identifier="regress_test_utf8_const_in">
       <return-value transfer-ownership="none">
         <type name="none" c:type="void"/>
       </return-value>
@@ -2210,13 +2237,13 @@ call and can be released on return.</doc>
       </parameters>
     </function>
     <function name="test_utf8_const_return"
-              c:identifier="test_utf8_const_return">
+              c:identifier="regress_test_utf8_const_return">
       <return-value transfer-ownership="none">
-        <doc xml:whitespace="preserve">&lt;const char*&gt; UTF-8 string</doc>
+        <doc xml:whitespace="preserve">UTF-8 string</doc>
         <type name="utf8" c:type="char*"/>
       </return-value>
     </function>
-    <function name="test_utf8_inout" c:identifier="test_utf8_inout">
+    <function name="test_utf8_inout" c:identifier="regress_test_utf8_inout">
       <return-value transfer-ownership="none">
         <type name="none" c:type="void"/>
       </return-value>
@@ -2230,24 +2257,26 @@ call and can be released on return.</doc>
       </parameters>
     </function>
     <function name="test_utf8_nonconst_in"
-              c:identifier="test_utf8_nonconst_in">
+              c:identifier="regress_test_utf8_nonconst_in">
       <return-value transfer-ownership="none">
         <type name="none" c:type="void"/>
       </return-value>
       <parameters>
         <parameter name="in" transfer-ownership="full">
+          <doc xml:whitespace="preserve">Accepted argument</doc>
           <type name="utf8" c:type="char*"/>
         </parameter>
       </parameters>
     </function>
     <function name="test_utf8_nonconst_return"
-              c:identifier="test_utf8_nonconst_return">
+              c:identifier="regress_test_utf8_nonconst_return">
       <return-value transfer-ownership="full">
-        <doc xml:whitespace="preserve">&lt;char*&gt; UTF-8 string</doc>
+        <doc xml:whitespace="preserve">UTF-8 string</doc>
         <type name="utf8" c:type="char*"/>
       </return-value>
     </function>
-    <function name="test_utf8_null_in" c:identifier="test_utf8_null_in">
+    <function name="test_utf8_null_in"
+              c:identifier="regress_test_utf8_null_in">
       <return-value transfer-ownership="none">
         <type name="none" c:type="void"/>
       </return-value>
@@ -2257,7 +2286,8 @@ call and can be released on return.</doc>
         </parameter>
       </parameters>
     </function>
-    <function name="test_utf8_null_out" c:identifier="test_utf8_null_out">
+    <function name="test_utf8_null_out"
+              c:identifier="regress_test_utf8_null_out">
       <return-value transfer-ownership="none">
         <type name="none" c:type="void"/>
       </return-value>
@@ -2271,7 +2301,7 @@ call and can be released on return.</doc>
         </parameter>
       </parameters>
     </function>
-    <function name="test_utf8_out" c:identifier="test_utf8_out">
+    <function name="test_utf8_out" c:identifier="regress_test_utf8_out">
       <return-value transfer-ownership="none">
         <type name="none" c:type="void"/>
       </return-value>
@@ -2285,7 +2315,7 @@ call and can be released on return.</doc>
       </parameters>
     </function>
     <function name="test_utf8_out_nonconst_return"
-              c:identifier="test_utf8_out_nonconst_return">
+              c:identifier="regress_test_utf8_out_nonconst_return">
       <return-value transfer-ownership="full">
         <doc xml:whitespace="preserve">a copy of "first"</doc>
         <type name="utf8" c:type="char*"/>
@@ -2300,7 +2330,8 @@ call and can be released on return.</doc>
         </parameter>
       </parameters>
     </function>
-    <function name="test_utf8_out_out" c:identifier="test_utf8_out_out">
+    <function name="test_utf8_out_out"
+              c:identifier="regress_test_utf8_out_out">
       <return-value transfer-ownership="none">
         <type name="none" c:type="void"/>
       </return-value>
@@ -2322,10 +2353,11 @@ call and can be released on return.</doc>
       </parameters>
     </function>
     <function name="test_value_get_fundamental_object"
-              c:identifier="test_value_get_fundamental_object"
+              c:identifier="regress_test_value_get_fundamental_object"
               introspectable="0">
       <return-value transfer-ownership="full">
-        <type name="TestFundamentalObject" c:type="TestFundamentalObject*"/>
+        <type name="TestFundamentalObject"
+              c:type="RegressTestFundamentalObject*"/>
       </return-value>
       <parameters>
         <parameter name="value" transfer-ownership="none">
@@ -2333,7 +2365,8 @@ call and can be released on return.</doc>
         </parameter>
       </parameters>
     </function>
-    <function name="test_value_return" c:identifier="test_value_return">
+    <function name="test_value_return"
+              c:identifier="regress_test_value_return">
       <return-value transfer-ownership="none">
         <doc xml:whitespace="preserve">the int wrapped in a GValue.</doc>
         <type name="GObject.Value" c:type="GValue*"/>
@@ -2346,7 +2379,7 @@ call and can be released on return.</doc>
       </parameters>
     </function>
     <function name="test_value_set_fundamental_object"
-              c:identifier="test_value_set_fundamental_object"
+              c:identifier="regress_test_value_set_fundamental_object"
               introspectable="0">
       <return-value transfer-ownership="none">
         <type name="none" c:type="void"/>
@@ -2356,7 +2389,8 @@ call and can be released on return.</doc>
           <type name="GObject.Value" c:type="GValue*"/>
         </parameter>
         <parameter name="fundamental_object" transfer-ownership="none">
-          <type name="TestFundamentalObject" c:type="TestFundamentalObject*"/>
+          <type name="TestFundamentalObject"
+                c:type="RegressTestFundamentalObject*"/>
         </parameter>
       </parameters>
     </function>
diff --git a/tests/scanner/regress.c b/tests/scanner/regress.c
new file mode 100644
index 0000000..e4326fb
--- /dev/null
+++ b/tests/scanner/regress.c
@@ -0,0 +1,2913 @@
+#include <string.h>
+#include <stdlib.h>
+#include <glib-object.h>
+#include <gobject/gvaluecollector.h>
+
+#include "regress.h"
+
+static gboolean abort_on_error = TRUE;
+
+#define ASSERT_VALUE(condition)  \
+  if (abort_on_error)             \
+    g_assert (condition);         \
+  else                            \
+    g_warn_if_fail (condition);   \
+
+void
+regress_set_abort_on_error (gboolean in)
+{
+  abort_on_error = in;
+}
+
+/* basic types */
+gboolean
+regress_test_boolean (gboolean in)
+{
+  return in;
+}
+
+gboolean
+regress_test_boolean_true (gboolean in)
+{
+  ASSERT_VALUE (in == TRUE);
+  return in;
+}
+
+gboolean
+regress_test_boolean_false (gboolean in)
+{
+  ASSERT_VALUE (in == FALSE);
+  return in;
+}
+
+gint8
+regress_test_int8 (gint8 in)
+{
+  return in;
+}
+
+guint8
+regress_test_uint8 (guint8 in)
+{
+  return in;
+}
+
+gint16
+regress_test_int16 (gint16 in)
+{
+  return in;
+}
+
+guint16
+regress_test_uint16 (guint16 in)
+{
+  return in;
+}
+
+gint32
+regress_test_int32 (gint32 in)
+{
+  return in;
+}
+
+guint32
+regress_test_uint32 (guint32 in)
+{
+  return in;
+}
+
+gint64
+regress_test_int64 (gint64 in)
+{
+  return in;
+}
+
+guint64
+regress_test_uint64 (guint64 in)
+{
+  return in;
+}
+
+gshort
+regress_test_short (gshort in)
+{
+  return in;
+}
+
+gushort
+regress_test_ushort (gushort in)
+{
+  return in;
+}
+
+gint
+regress_test_int (gint in)
+{
+  return in;
+}
+
+guint
+regress_test_uint (guint in)
+{
+  return in;
+}
+
+glong
+regress_test_long (glong in)
+{
+  return in;
+}
+
+gulong
+regress_test_ulong (gulong in)
+{
+  return in;
+}
+
+gssize
+regress_test_ssize (gssize in)
+{
+  return in;
+}
+
+gsize
+regress_test_size (gsize in)
+{
+  return in;
+}
+
+gfloat
+regress_test_float (gfloat in)
+{
+  return in;
+}
+
+gdouble
+regress_test_double (gdouble in)
+{
+  return in;
+}
+
+
+time_t
+regress_test_timet (time_t in)
+{
+  return in;
+}
+
+GType
+regress_test_gtype (GType in)
+{
+  return in;
+}
+
+int
+regress_test_closure (GClosure *closure)
+{
+  GValue return_value = {0, };
+  int ret;
+
+  g_value_init (&return_value, G_TYPE_INT);
+
+  g_closure_invoke (closure,
+                    &return_value,
+                    0, NULL,
+                    NULL);
+
+  ret = g_value_get_int (&return_value);
+
+  g_value_unset(&return_value);
+
+  return ret;
+}
+
+int
+regress_test_closure_one_arg (GClosure *closure, int arg)
+{
+  GValue return_value = {0, };
+  GValue arguments[1];
+  int ret;
+
+  g_value_init (&return_value, G_TYPE_INT);
+
+  memset (&arguments[0], 0, sizeof (arguments));
+  g_value_init (&arguments[0], G_TYPE_INT);
+  g_value_set_int (&arguments[0], arg);
+
+  g_closure_invoke (closure,
+                    &return_value,
+                    1, arguments,
+                    NULL);
+
+  ret = g_value_get_int (&return_value);
+
+  g_value_unset(&return_value);
+  g_value_unset(&arguments[0]);
+
+  return ret;
+}
+
+/**
+ * regress_test_value_arg:
+ * @v: (transfer none): a GValue expected to contain an int
+ *
+ * Return value: the int contained in the GValue.
+ */
+int
+regress_test_int_value_arg(const GValue *v)
+{
+  int i;
+
+  i = g_value_get_int (v);
+
+  return i;
+}
+
+static GValue value;
+/**
+ * regress_test_value_return:
+ * @i: an int
+ *
+ * Return value: (transfer none): the int wrapped in a GValue.
+ */
+const GValue *
+regress_test_value_return(int i)
+{
+  memset(&value, '\0', sizeof(GValue));
+
+  g_value_init (&value, G_TYPE_INT);
+  g_value_set_int (&value, i);
+
+  return &value;
+}
+
+/************************************************************************/
+/* foreign structs */
+
+/**
+ * regress_test_cairo_context_full_return:
+ * Returns: (transfer full):
+ */
+cairo_t *
+regress_test_cairo_context_full_return (void)
+{
+  cairo_surface_t *surface;
+  surface = cairo_image_surface_create (CAIRO_FORMAT_ARGB32, 10, 10);
+  return cairo_create (surface);
+}
+
+/**
+ * regress_test_cairo_context_none_in:
+ * @context: (transfer none):
+ */
+void
+regress_test_cairo_context_none_in (cairo_t *context)
+{
+  cairo_surface_t *surface = cairo_get_target (context);
+
+  g_assert (cairo_image_surface_get_format (surface) == CAIRO_FORMAT_ARGB32);
+  g_assert (cairo_image_surface_get_width (surface) == 10);
+  g_assert (cairo_image_surface_get_height (surface) == 10);
+}
+
+
+/**
+ * regress_test_cairo_surface_none_return:
+ * Returns: (transfer none):
+ */
+cairo_surface_t *
+regress_test_cairo_surface_none_return (void)
+{
+  static cairo_surface_t *surface;
+
+  if (surface == NULL) {
+    surface = cairo_image_surface_create (CAIRO_FORMAT_ARGB32, 10, 10);
+  }
+
+  return surface;
+}
+
+/**
+ * regress_test_cairo_surface_full_return:
+ * Returns: (transfer full):
+ */
+cairo_surface_t *
+regress_test_cairo_surface_full_return (void)
+{
+  return cairo_image_surface_create (CAIRO_FORMAT_ARGB32, 10, 10);
+}
+
+/**
+ * regress_test_cairo_surface_none_in:
+ * @surface: (transfer none):
+ */
+void
+regress_test_cairo_surface_none_in (cairo_surface_t *surface)
+{
+  g_assert (cairo_image_surface_get_format (surface) == CAIRO_FORMAT_ARGB32);
+  g_assert (cairo_image_surface_get_width (surface) == 10);
+  g_assert (cairo_image_surface_get_height (surface) == 10);
+}
+
+/**
+ * regress_test_cairo_surface_full_out:
+ * @surface: (out) (transfer full):
+ */
+void
+regress_test_cairo_surface_full_out (cairo_surface_t **surface)
+{
+  *surface = cairo_image_surface_create (CAIRO_FORMAT_ARGB32, 10, 10);
+}
+
+
+/************************************************************************/
+/* utf8 */
+/* insert BLACK HEART SUIT to ensure UTF-8 doesn't get mangled */
+static const char utf8_const[]    = "const \xe2\x99\xa5 utf8";
+static const char utf8_nonconst[] = "nonconst \xe2\x99\xa5 utf8";
+
+/**
+ * regress_test_utf8_const_return:
+ * Return value: UTF-8 string
+ */
+G_CONST_RETURN char *
+regress_test_utf8_const_return (void)
+{
+  /* transfer mode none */
+  return utf8_const;
+}
+
+/**
+ * regress_test_utf8_nonconst_return:
+ *
+ * Return value: (transfer full): UTF-8 string
+ */
+char *
+regress_test_utf8_nonconst_return (void)
+{
+  return g_strdup (utf8_nonconst);
+}
+
+/**
+ * regress_test_utf8_nonconst_in:
+ * @in: (transfer full): Accepted argument
+ */
+void
+regress_test_utf8_nonconst_in (char *in)
+{
+  g_assert (strcmp (in, utf8_nonconst) == 0);
+  g_free(in);
+}
+
+/**
+ * regress_test_utf8_const_in:
+ *
+ */
+void
+regress_test_utf8_const_in (const char *in)
+{
+  /* transfer mode none */
+  g_assert (strcmp (in, utf8_const) == 0);
+}
+
+/**
+ * regress_test_utf8_out:
+ * @out: (out) (transfer full):
+ */
+void
+regress_test_utf8_out (char **out)
+{
+  /* out parameter, transfer mode full */
+  *out = g_strdup (utf8_nonconst);
+}
+
+/**
+ * regress_test_utf8_inout:
+ * @inout: (inout) (transfer full):
+ */
+void
+regress_test_utf8_inout (char **inout)
+{
+  /* inout parameter, transfer mode full */
+  g_assert (strcmp (*inout, utf8_const) == 0);
+  g_free(*inout);
+  *inout = g_strdup (utf8_nonconst);
+}
+
+/**
+ * regress_test_filename_return:
+ *
+ * Return value: (element-type filename) (transfer full): list of strings
+ */
+GSList *
+regress_test_filename_return (void)
+{
+  GSList *filenames = NULL;
+  filenames = g_slist_prepend (filenames, g_filename_from_utf8("/etc/fstab", -1, NULL, NULL, NULL));
+  filenames = g_slist_prepend (filenames, g_filename_from_utf8("åäö", -1, NULL, NULL, NULL));
+  return filenames;
+}
+
+/* in arguments after out arguments */
+
+/**
+ * regress_test_int_out_utf8:
+ * @length: (out):
+ * @in:
+ */
+void
+regress_test_int_out_utf8 (int *length, const char *in)
+{
+    *length = g_utf8_strlen(in, -1);
+}
+
+
+/* multiple output arguments */
+
+/**
+ * regress_test_multi_double_args:
+ * @in:
+ * @one: (out):
+ * @two: (out):
+ */
+void
+regress_test_multi_double_args (gdouble in, gdouble *one, gdouble *two)
+{
+  *one = in * 2;
+  *two = in * 3;
+}
+
+/**
+ * regress_test_utf8_out_out:
+ * @out0: (out) (transfer full): a copy of "first"
+ * @out1: (out) (transfer full): a copy of "second"
+ */
+void
+regress_test_utf8_out_out (char **out0, char **out1)
+{
+  *out0 = g_strdup ("first");
+  *out1 = g_strdup ("second");
+}
+
+/**
+ * regress_test_utf8_out_nonconst_return:
+ * @out: (out) (transfer full): a copy of "second"
+ *
+ * Returns: (transfer full): a copy of "first"
+ */
+char *
+regress_test_utf8_out_nonconst_return (char **out)
+{
+  *out = g_strdup ("second");
+  return g_strdup ("first");
+}
+
+/**
+ * regress_test_utf8_null_in:
+ * @in: (allow-none):
+ */
+void
+regress_test_utf8_null_in (char *in)
+{
+  g_assert (in == NULL);
+}
+
+/**
+ * regress_test_utf8_null_out:
+ * @char_out: (allow-none) (out):
+ */
+void regress_test_utf8_null_out (char **char_out)
+{
+  *char_out = NULL;
+}
+
+
+/* non-basic-types */
+
+static const char *test_sequence[] = {"1", "2", "3"};
+
+/* array */
+
+/**
+ * regress_test_array_int_in:
+ * @n_ints:
+ * @ints: (array length=n_ints): List of ints
+ */
+int
+regress_test_array_int_in (int n_ints, int *ints)
+{
+  int i, sum = 0;
+  for (i = 0; i < n_ints; i++)
+    sum += ints[i];
+  return sum;
+}
+
+/**
+ * regress_test_array_int_out:
+ * @n_ints: (out): the length of @ints
+ * @ints: (out) (array length=n_ints) (transfer full): a list of 5 integers, from 0 to 4 in consecutive order
+ */
+void
+regress_test_array_int_out (int *n_ints, int **ints)
+{
+  int i;
+  *n_ints = 5;
+  *ints = g_malloc0(sizeof(**ints) * *n_ints);
+  for (i = 1; i < *n_ints; i++)
+    (*ints)[i] = (*ints)[i-1] + 1;
+}
+
+/**
+ * regress_test_array_int_inout:
+ * @n_ints: (inout): the length of @ints
+ * @ints: (inout) (array length=n_ints) (transfer full): a list of integers whose items will be increased by 1, except the first that will be dropped
+ */
+void
+regress_test_array_int_inout (int *n_ints, int **ints)
+{
+  int i;
+
+  for (i = 1; i < *n_ints; i++) {
+	(*ints)[i-1] = (*ints)[i] + 1;
+  }
+
+  if (0 < *n_ints) {
+    *n_ints -= 1;
+  }
+  *ints = g_realloc(*ints, sizeof(**ints) * *n_ints);
+}
+
+/**
+ * regress_test_array_gint8_in:
+ * @n_ints:
+ * @ints: (array length=n_ints): List of ints
+ */
+int
+regress_test_array_gint8_in (int n_ints, gint8 *ints)
+{
+  int i, sum = 0;
+  for (i = 0; i < n_ints; i++)
+    sum += ints[i];
+  return sum;
+}
+
+/**
+ * regress_test_array_gint16_in:
+ * @n_ints:
+ * @ints: (array length=n_ints): List of ints
+ */
+int
+regress_test_array_gint16_in (int n_ints, gint16 *ints)
+{
+  int i, sum = 0;
+  for (i = 0; i < n_ints; i++)
+    sum += ints[i];
+  return sum;
+}
+
+/**
+ * regress_test_array_gint32_in:
+ * @n_ints:
+ * @ints: (array length=n_ints): List of ints
+ */
+gint32
+regress_test_array_gint32_in (int n_ints, gint32 *ints)
+{
+  int i;
+  gint32 sum = 0;
+  for (i = 0; i < n_ints; i++)
+    sum += ints[i];
+  return sum;
+}
+
+/**
+ * regress_test_array_gint64_in:
+ * @n_ints:
+ * @ints: (array length=n_ints): List of ints
+ */
+gint64
+regress_test_array_gint64_in (int n_ints, gint64 *ints)
+{
+  int i;
+  gint64 sum = 0;
+  for (i = 0; i < n_ints; i++)
+    sum += ints[i];
+  return sum;
+}
+
+/**
+ * regress_test_strv_in:
+ * @arr: (array zero-terminated=1) (transfer none):
+ */
+gboolean
+regress_test_strv_in (char **arr)
+{
+  if (g_strv_length (arr) != 3)
+    return FALSE;
+  if (strcmp (arr[0], "1") != 0)
+    return FALSE;
+  if (strcmp (arr[1], "2") != 0)
+    return FALSE;
+  if (strcmp (arr[2], "3") != 0)
+    return FALSE;
+  return TRUE;
+}
+
+/**
+ * regress_test_strv_in_container:
+ * @arr: (array zero-terminated=1) (transfer container):
+ */
+gboolean
+regress_test_strv_in_container (char **arr)
+{
+  gboolean result = regress_test_strv_in (arr);
+  g_free (arr);
+  return result;
+}
+
+/**
+ * regress_test_array_gtype_in:
+ * @n_types:
+ * @types: (array length=n_types): List of types
+ * Return value: string representation of provided types
+ * */
+char *
+regress_test_array_gtype_in (int n_types, GType *types)
+{
+  GString *string;
+  int i;
+
+  string = g_string_new ("[");
+  for (i = 0; i < n_types; i++)
+    {
+      g_string_append (string, g_type_name (types[i]));
+      g_string_append_c (string, ',');
+    }
+  g_string_append_c (string, ']');
+  return g_string_free (string, FALSE);
+}
+
+/**
+ * regress_test_strv_out:
+ *
+ * No annotations here.  We want the default to Do The Right Thing.
+ *
+ * Returns: (transfer full):
+ */
+char **
+regress_test_strv_out (void)
+{
+  int i = 0;
+  int n = 6;
+  char **ret = g_new (char *, n);
+  ret[i++] = g_strdup ("thanks");
+  ret[i++] = g_strdup ("for");
+  ret[i++] = g_strdup ("all");
+  ret[i++] = g_strdup ("the");
+  ret[i++] = g_strdup ("fish");
+  ret[i++] = NULL;
+  g_assert (i == n);
+  return ret;
+}
+
+/**
+ * regress_test_strv_out_container:
+ *
+ * Return value: (array zero-terminated=1) (transfer container):
+ */
+char **
+regress_test_strv_out_container (void)
+{
+  char **ret = g_new (char *, 4);
+  ret[0] = "1";
+  ret[1] = "2";
+  ret[2] = "3";
+  ret[3] = NULL;
+  return ret;
+}
+
+/**
+ * regress_test_strv_outarg:
+ * @retp: (array zero-terminated=1) (out) (transfer container):
+ */
+void
+regress_test_strv_outarg (char ***retp)
+{
+  char **ret = g_new (char *, 4);
+  ret[0] = "1";
+  ret[1] = "2";
+  ret[2] = "3";
+  ret[3] = NULL;
+  *retp = ret;
+}
+
+/**
+ * regress_test_array_fixed_size_int_in:
+ * @ints: (array fixed-size=5): a list of 5 integers
+ *
+ * Returns: the sum of the items in @ints
+ */
+int
+regress_test_array_fixed_size_int_in (int *ints)
+{
+  int i, sum = 0;
+  for (i = 0; i < 5; i++)
+    sum += ints[i];
+  return sum;
+}
+
+/**
+ * regress_test_array_fixed_size_int_out:
+ * @ints: (out) (array fixed-size=5) (transfer full): a list of 5 integers ranging from 0 to 4
+ */
+void
+regress_test_array_fixed_size_int_out (int **ints)
+{
+  int i;
+  *ints = g_malloc0(sizeof(**ints) * 5);
+  for (i = 1; i < 5; i++)
+    (*ints)[i] = (*ints)[i-1] + 1;
+}
+
+/**
+ * regress_test_array_fixed_size_int_return:
+ * Returns: (array fixed-size=5) (transfer full): a list of 5 integers ranging from 0 to 4
+ */
+int *
+regress_test_array_fixed_size_int_return (void)
+{
+  int i, *ints;
+  ints = g_malloc0(sizeof(*ints) * 5);
+  for (i = 1; i < 5; i++)
+    ints[i] = ints[i-1] + 1;
+  return ints;
+}
+
+/**
+ * regress_test_array_int_in_take:
+ * @n_ints:
+ * @ints: (array length=n_ints) (transfer full): List of ints
+ */
+int
+regress_test_array_int_in_take (int n_ints, int *ints)
+{
+  int i, sum = 0;
+  for (i = 0; i < n_ints; i++)
+    sum += ints[i];
+  g_free (ints);
+  return sum;
+}
+
+/**
+ * regress_test_strv_out_c:
+ *
+ * No annotations here.  We want the default to Do The Right Thing.
+ */
+const char * const*
+regress_test_strv_out_c (void)
+{
+  static char **ret = NULL;
+
+  if (ret == NULL)
+    ret = regress_test_strv_out ();
+
+  return (const char * const *) ret;
+}
+
+/**
+ * regress_test_array_int_full_out:
+ * @len: length of the returned array.
+ * Returns: (array length=len) (transfer full): a new array of integers.
+ */
+int *
+regress_test_array_int_full_out(int *len)
+{
+  int *result, i;
+  *len = 5;
+  result = g_malloc0(sizeof(*result) * (*len));
+  for (i=1; i < (*len); i++)
+    result[i] = result[i-1] + 1;
+  return result;
+}
+
+/**
+ * regress_test_array_int_none_out:
+ * @len: length of the returned array.
+ * Returns: (array length=len) (transfer none): a static array of integers.
+ */
+int *
+regress_test_array_int_none_out(int *len)
+{
+  static int result[5] = { 1, 2, 3, 4, 5 };
+  *len = 5;
+  return result;
+}
+
+/**
+ * regress_test_array_int_null_in:
+ * @arr: (array length=len) (allow-none):
+ * @len: length
+ */
+void
+regress_test_array_int_null_in (int *arr, int len)
+{
+  g_assert (arr == NULL);
+}
+
+/**
+ * regress_test_array_int_null_out:
+ * @arr: (out) (array length=len) (allow-none):
+ * @len: (out) : length
+ */
+void
+regress_test_array_int_null_out (int **arr, int *len)
+{
+  *arr = NULL;
+  *len = 0;
+}
+
+/* interface */
+
+/************************************************************************/
+/* GList */
+
+static /*const*/ GList *
+regress_test_sequence_list()
+{
+    static GList *list = NULL;
+    if (!list) {
+        gsize i;
+        for (i = 0; i < G_N_ELEMENTS(test_sequence); ++i) {
+            list = g_list_prepend (list, (gpointer)test_sequence[i]);
+        }
+        list = g_list_reverse (list);
+    }
+    return list;
+}
+
+/**
+ * regress_test_glist_free:
+ * @in: (element-type utf8) (transfer full):
+ */
+void
+regress_test_glist_free (GList *in)
+{
+  g_list_foreach (in, (GFunc)g_free, NULL);
+  g_list_free (in);
+}
+
+/**
+ * regress_test_glist_nothing_return:
+ *
+ * Return value: (element-type utf8) (transfer none):
+ */
+G_CONST_RETURN GList *
+regress_test_glist_nothing_return (void)
+{
+  return regress_test_sequence_list ();
+}
+
+/**
+ * regress_test_glist_nothing_return2:
+ *
+ * Return value: (element-type utf8) (transfer none):
+ */
+GList *
+regress_test_glist_nothing_return2 (void)
+{
+  return regress_test_sequence_list ();
+}
+
+/**
+ * regress_test_glist_container_return:
+ *
+ * Return value: (element-type utf8) (transfer container):
+ */
+GList *
+regress_test_glist_container_return (void)
+{
+  return g_list_copy (regress_test_sequence_list ());
+}
+
+/**
+ * regress_test_glist_everything_return:
+ *
+ * Return value: (element-type utf8) (transfer full):
+ */
+GList *
+regress_test_glist_everything_return (void)
+{
+  GList *list;
+  GList *l;
+
+  list = g_list_copy (regress_test_sequence_list ());
+  for (l = list; l != NULL; l = l->next)
+      l->data = g_strdup (l->data);
+  return list;
+}
+
+static void
+regress_assert_test_sequence_list (const GList *in)
+{
+  const GList *l;
+  gsize i;
+
+  for (i = 0, l = in; l != NULL; ++i, l = l->next) {
+      g_assert (i < G_N_ELEMENTS(test_sequence));
+      g_assert (strcmp (l->data, test_sequence[i]) == 0);
+  }
+  g_assert (i == G_N_ELEMENTS(test_sequence));
+}
+
+/**
+ * regress_test_glist_nothing_in:
+ * @in: (element-type utf8):
+ */
+void
+regress_test_glist_nothing_in (const GList *in)
+{
+  regress_assert_test_sequence_list (in);
+}
+
+/**
+ * regress_test_glist_nothing_in2:
+ * @in: (element-type utf8):
+ */
+void
+regress_test_glist_nothing_in2 (GList *in)
+{
+  regress_assert_test_sequence_list (in);
+}
+
+/**
+ * regress_test_glist_container_in:
+ * @in: (element-type utf8) (transfer container):
+ */
+void
+regress_test_glist_container_in (GList *in)
+{
+  regress_assert_test_sequence_list (in);
+  g_list_free (in);
+}
+
+/**
+ * regress_test_glist_everything_in:
+ * @in: (element-type utf8) (transfer full):
+ */
+void
+regress_test_glist_everything_in (GList *in)
+{
+  regress_assert_test_sequence_list (in);
+  regress_test_glist_free (in);
+}
+
+/**
+ * regress_test_glist_null_in:
+ * @in: (element-type utf8) (allow-none):
+ */
+void
+regress_test_glist_null_in (GSList *in)
+{
+  g_assert (in == NULL);
+}
+
+/**
+ * regress_test_glist_null_out:
+ * @out_list: (out) (element-type utf8) (allow-none):
+ */
+void
+regress_test_glist_null_out (GSList **out_list)
+{
+  *out_list = NULL;
+}
+
+
+/************************************************************************/
+/* GSList */
+
+static /*const*/ GSList *
+regress_test_sequence_slist()
+{
+    static GSList *list = NULL;
+    if (!list) {
+        gsize i;
+        for (i = 0; i < G_N_ELEMENTS(test_sequence); ++i) {
+            list = g_slist_prepend (list, (gpointer)test_sequence[i]);
+        }
+        list = g_slist_reverse (list);
+    }
+    return list;
+}
+
+/**
+ * regress_test_gslist_free:
+ * @in: (element-type utf8) (transfer full):
+ */
+void
+regress_test_gslist_free (GSList *in)
+{
+  g_slist_foreach (in, (GFunc)g_free, NULL);
+  g_slist_free (in);
+}
+
+/**
+ * regress_test_gslist_nothing_return:
+ *
+ * Return value: (element-type utf8) (transfer none):
+ */
+G_CONST_RETURN GSList *
+regress_test_gslist_nothing_return (void)
+{
+  return regress_test_sequence_slist ();
+}
+
+/**
+ * regress_test_gslist_nothing_return2:
+ *
+ * Return value: (element-type utf8) (transfer none):
+ */
+GSList *
+regress_test_gslist_nothing_return2 (void)
+{
+  return regress_test_sequence_slist ();
+}
+
+/**
+ * regress_test_gslist_container_return:
+ *
+ * Return value: (element-type utf8) (transfer container):
+ */
+GSList *
+regress_test_gslist_container_return (void)
+{
+  return g_slist_copy (regress_test_sequence_slist ());
+}
+
+/**
+ * regress_test_gslist_everything_return:
+ *
+ * Return value: (element-type utf8) (transfer full):
+ */
+GSList *
+regress_test_gslist_everything_return (void)
+{
+  GSList *list;
+  GSList *l;
+
+  list = g_slist_copy (regress_test_sequence_slist ());
+  for (l = list; l != NULL; l = l->next)
+      l->data = g_strdup (l->data);
+  return list;
+}
+
+static void
+regress_assert_test_sequence_slist (const GSList *in)
+{
+  const GSList *l;
+  gsize i;
+
+  for (i = 0, l = in; l != NULL; ++i, l = l->next) {
+      g_assert (i < G_N_ELEMENTS(test_sequence));
+      g_assert (strcmp (l->data, test_sequence[i]) == 0);
+  }
+  g_assert (i == G_N_ELEMENTS(test_sequence));
+}
+
+/**
+ * regress_test_gslist_nothing_in:
+ * @in: (element-type utf8):
+ */
+void
+regress_test_gslist_nothing_in (const GSList *in)
+{
+  regress_assert_test_sequence_slist (in);
+}
+
+/**
+ * regress_test_gslist_nothing_in2:
+ * @in: (element-type utf8):
+ */
+void
+regress_test_gslist_nothing_in2 (GSList *in)
+{
+  regress_assert_test_sequence_slist (in);
+}
+
+/**
+ * regress_test_gslist_container_in:
+ * @in: (element-type utf8) (transfer container):
+ */
+void
+regress_test_gslist_container_in (GSList *in)
+{
+  regress_assert_test_sequence_slist (in);
+  g_slist_free (in);
+}
+
+/**
+ * regress_test_gslist_everything_in:
+ * @in: (element-type utf8) (transfer full):
+ */
+void regress_test_gslist_everything_in (GSList *in)
+{
+  regress_assert_test_sequence_slist (in);
+  regress_test_gslist_free (in);
+}
+
+/**
+ * regress_test_gslist_null_in:
+ * @in: (element-type utf8) (allow-none):
+ */
+void
+regress_test_gslist_null_in (GSList *in)
+{
+  g_assert (in == NULL);
+}
+
+/**
+ * regress_test_gslist_null_out:
+ * @out_list: (out) (element-type utf8) (allow-none):
+ */
+void
+regress_test_gslist_null_out (GSList **out_list)
+{
+  *out_list = NULL;
+}
+
+/************************************************************************/
+/* GHash */
+
+static char *table_data[3][2] = {
+  { "foo", "bar" }, { "baz", "bat" }, { "qux", "quux" }
+};
+
+static GHashTable *
+regress_test_table_ghash_new_container()
+{
+  GHashTable *hash;
+  int i;
+  hash = g_hash_table_new(g_str_hash, g_str_equal);
+  for (i=0; i<3; i++)
+    g_hash_table_insert(hash, table_data[i][0], table_data[i][1]);
+  return hash;
+}
+
+static GHashTable *
+regress_test_table_ghash_new_full()
+{
+  GHashTable *hash;
+  int i;
+  hash = g_hash_table_new_full(g_str_hash, g_str_equal, g_free, g_free);
+  for (i=0; i<3; i++)
+    g_hash_table_insert(hash,
+                        g_strdup(table_data[i][0]),
+                        g_strdup(table_data[i][1]));
+  return hash;
+}
+
+static /*const*/ GHashTable *
+regress_test_table_ghash_const()
+{
+  static GHashTable *hash = NULL;
+  if (!hash) {
+    hash = regress_test_table_ghash_new_container();
+  }
+  return hash;
+}
+
+/**
+ * regress_test_ghash_free:
+ * @in: (transfer full) (element-type utf8 utf8):
+ */
+void
+regress_test_ghash_free (GHashTable *in)
+{
+  /* keys and values are deleted iff an appropriate element destroy function
+   * was registered */
+  g_hash_table_unref(in);
+}
+
+/**
+ * regress_test_ghash_null_return:
+ *
+ * Return value: (element-type utf8 utf8) (transfer none) (allow-none):
+ */
+G_CONST_RETURN GHashTable *
+regress_test_ghash_null_return (void)
+{
+  return NULL;
+}
+
+/**
+ * regress_test_ghash_nothing_return:
+ *
+ * Return value: (element-type utf8 utf8) (transfer none):
+ */
+G_CONST_RETURN GHashTable *
+regress_test_ghash_nothing_return (void)
+{
+  return regress_test_table_ghash_const ();
+}
+
+/**
+ * regress_test_ghash_nothing_return2:
+ *
+ * Return value: (element-type utf8 utf8) (transfer none):
+ */
+GHashTable *
+regress_test_ghash_nothing_return2 (void)
+{
+  return regress_test_table_ghash_const ();
+}
+
+/**
+ * regress_test_ghash_container_return:
+ *
+ * Return value: (element-type utf8 utf8) (transfer container):
+ */
+GHashTable *
+regress_test_ghash_container_return (void)
+{
+  return regress_test_table_ghash_new_container ();
+}
+
+/**
+ * regress_test_ghash_everything_return:
+ *
+ * Return value: (element-type utf8 utf8) (transfer full):
+ */
+GHashTable *
+regress_test_ghash_everything_return (void)
+{
+  return regress_test_table_ghash_new_full ();
+}
+
+static void
+assert_test_table_ghash (const GHashTable *in)
+{
+  GHashTable *h = regress_test_table_ghash_const();
+  GHashTableIter iter;
+  gpointer key, value;
+
+  g_assert(g_hash_table_size(h) ==
+           g_hash_table_size((GHashTable*)in));
+
+  g_hash_table_iter_init(&iter, (GHashTable*)in);
+  while (g_hash_table_iter_next (&iter, &key, &value))
+    g_assert( strcmp(g_hash_table_lookup(h, (char*)key), (char*)value) == 0);
+}
+
+/**
+ * regress_test_ghash_null_in:
+ * @in: (element-type utf8 utf8) (allow-none):
+ */
+void
+regress_test_ghash_null_in (const GHashTable *in)
+{
+  g_assert (in == NULL);
+}
+
+/**
+ * regress_test_ghash_null_out:
+ * @out: (element-type utf8 utf8) (allow-none) (out):
+ */
+void
+regress_test_ghash_null_out (const GHashTable **out)
+{
+  *out = NULL;
+}
+
+/**
+ * regress_test_ghash_nothing_in:
+ * @in: (element-type utf8 utf8):
+ */
+void
+regress_test_ghash_nothing_in (const GHashTable *in)
+{
+  assert_test_table_ghash (in);
+}
+
+/**
+ * regress_test_ghash_nothing_in2:
+ * @in: (element-type utf8 utf8):
+ */
+void
+regress_test_ghash_nothing_in2 (GHashTable *in)
+{
+  assert_test_table_ghash (in);
+}
+
+/**
+ * regress_test_ghash_container_in:
+ * @in: (transfer container) (element-type utf8 utf8):
+ */
+void
+regress_test_ghash_container_in (GHashTable *in)
+{
+  assert_test_table_ghash (in);
+  /* be careful and explicitly steal all the elements from the ghash before
+   * freeing it. */
+  g_hash_table_steal_all (in);
+  g_hash_table_destroy (in);
+}
+
+static gboolean
+ghash_freer(gpointer key, gpointer value, gpointer user_data)
+{
+  g_free(key);
+  g_free(value);
+  return TRUE;
+}
+
+/**
+ * regress_test_ghash_everything_in:
+ * @in: (transfer full) (element-type utf8 utf8):
+ */
+void
+regress_test_ghash_everything_in (GHashTable *in)
+{
+  assert_test_table_ghash (in);
+  /* free the elements, then free the container.  Don't rely on the
+   * GHashTable's key/value destructor functions. */
+  g_hash_table_foreach_steal (in, ghash_freer, NULL);
+  /* okay, dealloc the hash table. */
+  g_hash_table_destroy (in);
+}
+
+/* Nested collection types */
+
+/**
+ * regress_test_ghash_nested_everything_return:
+ *
+ * Specify nested parameterized types directly with the (type ) annotation.
+ *
+ * Return value: (type GLib.HashTable<utf8,GLib.HashTable<utf8,utf8>>) (transfer full):
+ */
+GHashTable *
+regress_test_ghash_nested_everything_return (void)
+{
+  GHashTable *hash;
+  hash = g_hash_table_new_full(g_str_hash, g_str_equal, g_free,
+                               (void (*) (gpointer)) g_hash_table_destroy);
+  g_hash_table_insert(hash, g_strdup("wibble"), regress_test_table_ghash_new_full());
+  return hash;
+}
+
+/**
+ * regress_test_ghash_nested_everything_return2:
+ *
+ * Another way of specifying nested parameterized types: using the
+ * element-type annotation.
+ *
+ * Return value: (element-type utf8 GLib.HashTable<utf8,utf8>) (transfer full):
+ */
+GHashTable *
+regress_test_ghash_nested_everything_return2 (void)
+{
+  return regress_test_ghash_nested_everything_return();
+}
+
+/************************************************************************/
+
+/* error? */
+
+/* enums / flags */
+
+GType
+regress_test_enum_get_type (void)
+{
+    static GType etype = 0;
+    if (G_UNLIKELY(etype == 0)) {
+        static const GEnumValue values[] = {
+            { REGRESS_TEST_VALUE1, "REGRESS_TEST_VALUE1", "value1" },
+            { REGRESS_TEST_VALUE2, "REGRESS_TEST_VALUE2", "value2" },
+            { REGRESS_TEST_VALUE3, "REGRESS_TEST_VALUE3", "value3" },
+            { 0, NULL, NULL }
+        };
+        etype = g_enum_register_static (g_intern_static_string ("RegressTestEnum"), values);
+    }
+
+    return etype;
+}
+
+GType
+regress_test_flags_get_type (void)
+{
+    static GType etype = 0;
+    if (G_UNLIKELY(etype == 0)) {
+        static const GFlagsValue values[] = {
+            { REGRESS_TEST_FLAG1, "TEST_FLAG1", "flag1" },
+            { REGRESS_TEST_FLAG2, "TEST_FLAG2", "flag2" },
+            { REGRESS_TEST_FLAG3, "TEST_FLAG3", "flag3" },
+            { 0, NULL, NULL }
+        };
+        etype = g_flags_register_static (g_intern_static_string ("RegressTestFlags"), values);
+    }
+
+    return etype;
+}
+
+const gchar *
+regress_test_enum_param(RegressTestEnum e)
+{
+  GEnumValue *ev;
+  GEnumClass *ec;
+
+  ec = g_type_class_ref (regress_test_enum_get_type ());
+  ev = g_enum_get_value (ec, e);
+  g_type_class_unref (ec);
+
+  return ev->value_nick;
+}
+
+/* structures */
+
+/**
+ * regress_test_struct_a_clone:
+ * @a: the structure
+ * @a_out: (out caller-allocates): the cloned structure
+ *
+ * Make a copy of a RegressTestStructA
+ */
+void
+regress_test_struct_a_clone (RegressTestStructA *a,
+		     RegressTestStructA *a_out)
+{
+  *a_out = *a;
+}
+
+/**
+ * regress_test_struct_b_clone:
+ * @b: the structure
+ * @b_out: (out): the cloned structure
+ *
+ * Make a copy of a RegressTestStructB
+ */
+void
+regress_test_struct_b_clone (RegressTestStructB *b,
+		     RegressTestStructB *b_out)
+{
+  *b_out = *b;
+}
+
+/* plain-old-data boxed types */
+
+RegressTestSimpleBoxedA *
+regress_test_simple_boxed_a_copy (RegressTestSimpleBoxedA *a)
+{
+  RegressTestSimpleBoxedA *new_a = g_slice_new (RegressTestSimpleBoxedA);
+
+  *new_a = *a;
+
+  return new_a;
+}
+
+static void
+regress_test_simple_boxed_a_free (RegressTestSimpleBoxedA *a)
+{
+  g_slice_free (RegressTestSimpleBoxedA, a);
+}
+
+GType
+regress_test_simple_boxed_a_get_type (void)
+{
+  static GType our_type = 0;
+
+  if (our_type == 0)
+    our_type = g_boxed_type_register_static (g_intern_static_string ("RegressTestSimpleBoxedA"),
+					     (GBoxedCopyFunc)regress_test_simple_boxed_a_copy,
+					     (GBoxedFreeFunc)regress_test_simple_boxed_a_free);
+  return our_type;
+}
+
+RegressTestSimpleBoxedB *
+regress_test_simple_boxed_b_copy (RegressTestSimpleBoxedB *b)
+{
+  RegressTestSimpleBoxedB *new_b = g_slice_new (RegressTestSimpleBoxedB);
+
+  *new_b = *b;
+
+  return new_b;
+}
+
+gboolean
+regress_test_simple_boxed_a_equals (RegressTestSimpleBoxedA *a,
+			    RegressTestSimpleBoxedA *other_a)
+{
+  return (a->some_int == other_a->some_int &&
+	  a->some_int8 == other_a->some_int8 &&
+	  a->some_double == other_a->some_double);
+}
+
+const RegressTestSimpleBoxedA*
+regress_test_simple_boxed_a_const_return (void)
+{
+  static RegressTestSimpleBoxedA simple_a = {
+    5, 6, 7.0
+  };
+
+  return &simple_a;
+}
+
+static void
+regress_test_simple_boxed_b_free (RegressTestSimpleBoxedB *a)
+{
+  g_slice_free (RegressTestSimpleBoxedB, a);
+}
+
+GType
+regress_test_simple_boxed_b_get_type (void)
+{
+  static GType our_type = 0;
+
+  if (our_type == 0)
+    our_type = g_boxed_type_register_static (g_intern_static_string ("RegressTestSimpleBoxedB"),
+					     (GBoxedCopyFunc)regress_test_simple_boxed_b_copy,
+					     (GBoxedFreeFunc)regress_test_simple_boxed_b_free);
+  return our_type;
+}
+
+/* opaque boxed */
+
+struct _RegressTestBoxedPrivate
+{
+  guint magic;
+};
+
+/**
+ * regress_test_boxed_new:
+ *
+ * Returns: (transfer full):
+ */
+RegressTestBoxed *
+regress_test_boxed_new (void)
+{
+  RegressTestBoxed *boxed = g_slice_new0(RegressTestBoxed);
+  boxed->priv = g_slice_new0(RegressTestBoxedPrivate);
+  boxed->priv->magic = 0xdeadbeef;
+
+  return boxed;
+}
+
+/**
+ * regress_test_boxed_new_alternative_constructor1:
+ *
+ * Returns: (transfer full):
+ */
+RegressTestBoxed *
+regress_test_boxed_new_alternative_constructor1 (int i)
+{
+  RegressTestBoxed *boxed = g_slice_new0(RegressTestBoxed);
+  boxed->priv = g_slice_new0(RegressTestBoxedPrivate);
+  boxed->priv->magic = 0xdeadbeef;
+  boxed->some_int8 = i;
+
+  return boxed;
+}
+
+/**
+ * regress_test_boxed_new_alternative_constructor2:
+ *
+ * Returns: (transfer full):
+ */
+RegressTestBoxed *
+regress_test_boxed_new_alternative_constructor2 (int i, int j)
+{
+  RegressTestBoxed *boxed = g_slice_new0(RegressTestBoxed);
+  boxed->priv = g_slice_new0(RegressTestBoxedPrivate);
+  boxed->priv->magic = 0xdeadbeef;
+  boxed->some_int8 = i + j;
+
+  return boxed;
+}
+
+/**
+ * regress_test_boxed_new_alternative_constructor3:
+ *
+ * Returns: (transfer full):
+ */
+RegressTestBoxed *
+regress_test_boxed_new_alternative_constructor3 (char *s)
+{
+  RegressTestBoxed *boxed = g_slice_new0(RegressTestBoxed);
+  boxed->priv = g_slice_new0(RegressTestBoxedPrivate);
+  boxed->priv->magic = 0xdeadbeef;
+  boxed->some_int8 = atoi(s);
+
+  return boxed;
+}
+
+/**
+ * regress_test_boxed_copy:
+ *
+ * Returns: (transfer full):
+ */
+RegressTestBoxed *
+regress_test_boxed_copy (RegressTestBoxed *boxed)
+{
+  RegressTestBoxed *new_boxed = regress_test_boxed_new();
+  RegressTestBoxedPrivate *save;
+
+  save = new_boxed->priv;
+  *new_boxed = *boxed;
+  new_boxed->priv = save;
+
+  return new_boxed;
+}
+
+gboolean
+regress_test_boxed_equals (RegressTestBoxed *boxed,
+		   RegressTestBoxed *other)
+{
+  return (other->some_int8 == boxed->some_int8 &&
+	  regress_test_simple_boxed_a_equals(&other->nested_a, &boxed->nested_a));
+}
+
+static void
+regress_test_boxed_free (RegressTestBoxed *boxed)
+{
+  g_assert (boxed->priv->magic == 0xdeadbeef);
+
+  g_slice_free (RegressTestBoxedPrivate, boxed->priv);
+  g_slice_free (RegressTestBoxed, boxed);
+}
+
+GType
+regress_test_boxed_get_type (void)
+{
+  static GType our_type = 0;
+
+  if (our_type == 0)
+    our_type = g_boxed_type_register_static (g_intern_static_string ("RegressTestBoxed"),
+					     (GBoxedCopyFunc)regress_test_boxed_copy,
+					     (GBoxedFreeFunc)regress_test_boxed_free);
+  return our_type;
+}
+
+G_DEFINE_TYPE(RegressTestObj, regress_test_obj, G_TYPE_OBJECT);
+
+enum
+{
+  PROP_TEST_OBJ_BARE = 1,
+  PROP_TEST_OBJ_BOXED,
+  PROP_TEST_OBJ_HASH_TABLE,
+  PROP_TEST_OBJ_LIST,
+  PROP_TEST_OBJ_INT,
+  PROP_TEST_OBJ_FLOAT,
+  PROP_TEST_OBJ_DOUBLE,
+  PROP_TEST_OBJ_STRING
+};
+
+static void
+regress_test_obj_set_property (GObject      *object,
+                       guint         property_id,
+                       const GValue *value,
+                       GParamSpec   *pspec)
+{
+  RegressTestObj *self = REGRESS_TEST_OBJECT (object);
+  GList *list;
+
+  switch (property_id)
+    {
+    case PROP_TEST_OBJ_BARE:
+      regress_test_obj_set_bare (self, g_value_get_object (value));
+      break;
+
+    case PROP_TEST_OBJ_BOXED:
+      if (self->boxed)
+        regress_test_boxed_free (self->boxed);
+      self->boxed = g_value_dup_boxed (value);
+      break;
+
+    case PROP_TEST_OBJ_HASH_TABLE:
+      if (self->hash_table)
+        g_hash_table_unref (self->hash_table);
+      self->hash_table = g_hash_table_ref (g_value_get_boxed (value));
+      break;
+
+    case PROP_TEST_OBJ_LIST:
+      if (self->list != NULL)
+        {
+          for (list = self->list; list != NULL; list = g_list_next (list))
+            g_free (list->data);
+          g_list_free (self->list);
+        }
+      self->list = NULL;
+      for (list = g_value_get_pointer (value); list != NULL; list = g_list_next (list))
+        self->list = g_list_append (self->list, g_strdup (list->data));
+      break;
+
+    case PROP_TEST_OBJ_INT:
+      self->some_int8 = g_value_get_int (value);
+      break;
+
+    case PROP_TEST_OBJ_FLOAT:
+      self->some_float = g_value_get_float (value);
+      break;
+
+    case PROP_TEST_OBJ_DOUBLE:
+      self->some_double = g_value_get_double (value);
+      break;
+
+    case PROP_TEST_OBJ_STRING:
+      self->string = g_value_dup_string (value);
+      break;
+
+    default:
+      /* We don't have any other property... */
+      G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
+      break;
+    }
+}
+
+static void
+regress_test_obj_get_property (GObject    *object,
+                        guint       property_id,
+                        GValue     *value,
+                        GParamSpec *pspec)
+{
+  RegressTestObj *self = REGRESS_TEST_OBJECT (object);
+
+  switch (property_id)
+    {
+    case PROP_TEST_OBJ_BARE:
+      g_value_set_object (value, self->bare);
+      break;
+
+    case PROP_TEST_OBJ_BOXED:
+      g_value_set_boxed (value, self->boxed);
+      break;
+
+    case PROP_TEST_OBJ_HASH_TABLE:
+      if (self->hash_table != NULL)
+        g_hash_table_ref (self->hash_table);
+      g_value_set_boxed (value, self->hash_table);
+      break;
+
+    case PROP_TEST_OBJ_LIST:
+      g_value_set_pointer (value, self->list);
+      break;
+
+    case PROP_TEST_OBJ_INT:
+      g_value_set_int (value, self->some_int8);
+      break;
+
+    case PROP_TEST_OBJ_FLOAT:
+      g_value_set_float (value, self->some_float);
+      break;
+
+    case PROP_TEST_OBJ_DOUBLE:
+      g_value_set_double (value, self->some_double);
+      break;
+
+    case PROP_TEST_OBJ_STRING:
+      g_value_set_string (value, self->string);
+      break;
+
+    default:
+      /* We don't have any other property... */
+      G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
+      break;
+    }
+}
+
+static void
+regress_test_obj_dispose (GObject *gobject)
+{
+  RegressTestObj *self = REGRESS_TEST_OBJECT (gobject);
+
+  if (self->bare)
+    {
+      g_object_unref (self->bare);
+
+      self->bare = NULL;
+    }
+
+  if (self->boxed)
+    {
+      regress_test_boxed_free (self->boxed);
+      self->boxed = NULL;
+    }
+
+  /* Chain up to the parent class */
+  G_OBJECT_CLASS (regress_test_obj_parent_class)->dispose (gobject);
+}
+
+static int
+regress_test_obj_default_matrix (RegressTestObj *obj, const char *somestr)
+{
+  return 42;
+}
+
+static void
+regress_test_obj_class_init (RegressTestObjClass *klass)
+{
+  GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
+  GParamSpec *pspec;
+  GType param_types[1];
+
+  klass->test_signal =
+    g_signal_newv ("test",
+                   G_TYPE_FROM_CLASS (gobject_class),
+                   G_SIGNAL_RUN_LAST | G_SIGNAL_NO_RECURSE | G_SIGNAL_NO_HOOKS,
+                   NULL /* closure */,
+                   NULL /* accumulator */,
+                   NULL /* accumulator data */,
+                   g_cclosure_marshal_VOID__VOID,
+                   G_TYPE_NONE /* return_type */,
+                   0     /* n_params */,
+                   NULL  /* param_types */);
+
+  param_types[0] = regress_test_simple_boxed_a_get_type() | G_SIGNAL_TYPE_STATIC_SCOPE;
+  klass->test_signal_with_static_scope_arg =
+    g_signal_newv ("test-with-static-scope-arg",
+                   G_TYPE_FROM_CLASS (gobject_class),
+                   G_SIGNAL_RUN_LAST | G_SIGNAL_NO_RECURSE | G_SIGNAL_NO_HOOKS,
+                   NULL /* closure */,
+                   NULL /* accumulator */,
+                   NULL /* accumulator data */,
+                   g_cclosure_marshal_VOID__BOXED,
+                   G_TYPE_NONE /* return_type */,
+                   1     /* n_params */,
+                   param_types);
+
+  gobject_class->set_property = regress_test_obj_set_property;
+  gobject_class->get_property = regress_test_obj_get_property;
+  gobject_class->dispose = regress_test_obj_dispose;
+
+  pspec = g_param_spec_object ("bare",
+                               "Bare property",
+                               "A contained object",
+                               G_TYPE_OBJECT,
+                               G_PARAM_READWRITE);
+  g_object_class_install_property (gobject_class,
+                                   PROP_TEST_OBJ_BARE,
+                                   pspec);
+
+  pspec = g_param_spec_boxed ("boxed",
+                              "Boxed property",
+                              "A contained boxed struct",
+                              REGRESS_TEST_TYPE_BOXED,
+                              G_PARAM_READWRITE);
+  g_object_class_install_property (gobject_class,
+                                   PROP_TEST_OBJ_BOXED,
+                                   pspec);
+
+  /**
+   * RegressTestObj:hash-table:
+   *
+   * Type: GLib.HashTable<utf8,gint8>
+   * Transfer: container
+   */
+  pspec = g_param_spec_boxed ("hash-table",
+                              "GHashTable property",
+                              "A contained GHashTable",
+                              G_TYPE_HASH_TABLE,
+                              G_PARAM_READWRITE);
+  g_object_class_install_property (gobject_class,
+                                   PROP_TEST_OBJ_HASH_TABLE,
+                                   pspec);
+
+  /**
+   * RegressTestObj:list:
+   *
+   * Type: GLib.List<utf8>
+   * Transfer: none
+   */
+  pspec = g_param_spec_pointer ("list",
+                                "GList property",
+                                "A contained GList",
+                                G_PARAM_READWRITE);
+  g_object_class_install_property (gobject_class,
+                                   PROP_TEST_OBJ_LIST,
+                                   pspec);
+
+
+  /**
+   * TestObj:int:
+   */
+  pspec = g_param_spec_int ("int",
+                            "int property",
+                            "A contained int",
+                            G_MININT,
+                            G_MAXINT,
+                            0,
+                            G_PARAM_READWRITE);
+  g_object_class_install_property (gobject_class,
+                                   PROP_TEST_OBJ_INT,
+                                   pspec);
+
+  /**
+   * TestObj:float:
+   */
+  pspec = g_param_spec_float ("float",
+                              "float property",
+                              "A contained float",
+                              G_MINFLOAT,
+                              G_MAXFLOAT,
+                              1.0f,
+                              G_PARAM_READWRITE);
+  g_object_class_install_property (gobject_class,
+                                   PROP_TEST_OBJ_FLOAT,
+                                   pspec);
+
+  /**
+   * TestObj:double:
+   */
+  pspec = g_param_spec_double ("double",
+                               "double property",
+                               "A contained double",
+                               G_MINDOUBLE,
+                               G_MAXDOUBLE,
+                               1.0f,
+                               G_PARAM_READWRITE);
+  g_object_class_install_property (gobject_class,
+                                   PROP_TEST_OBJ_DOUBLE,
+                                   pspec);
+
+  /**
+   * TestObj:string:
+   */
+  pspec = g_param_spec_string ("string",
+                               "string property",
+                               "A contained string",
+                               NULL,
+                               G_PARAM_READWRITE);
+  g_object_class_install_property (gobject_class,
+                                   PROP_TEST_OBJ_STRING,
+                                   pspec);
+
+
+  klass->matrix = regress_test_obj_default_matrix;
+}
+
+static void
+regress_test_obj_init (RegressTestObj *obj)
+{
+  obj->bare = NULL;
+  obj->boxed = NULL;
+  obj->hash_table = NULL;
+}
+
+/**
+ * regress_test_obj_new_from_file:
+ */
+RegressTestObj *
+regress_test_obj_new_from_file (const char *x, GError **error)
+{
+  return g_object_new (REGRESS_TEST_TYPE_OBJ, NULL);
+}
+
+/**
+ * regress_test_obj_set_bare:
+ * @bare: (allow-none):
+ */
+void
+regress_test_obj_set_bare (RegressTestObj *obj, GObject *bare)
+{
+  if (obj->bare)
+    g_object_unref (obj->bare);
+  obj->bare = bare;
+  if (obj->bare)
+    g_object_ref (obj->bare);
+}
+
+int
+regress_test_obj_instance_method (RegressTestObj *obj)
+{
+    return -1;
+}
+
+double
+regress_test_obj_static_method (int x)
+{
+  return x;
+}
+
+/**
+ * regress_test_obj_torture_signature_0:
+ * @obj: A #RegressTestObj
+ * @x:
+ * @y: (out):
+ * @z: (out):
+ * @foo:
+ * @q: (out):
+ * @m:
+ *
+ */
+void
+regress_test_obj_torture_signature_0 (RegressTestObj    *obj,
+                              int         x,
+                              double     *y,
+                              int        *z,
+                              const char *foo,
+                              int        *q,
+                              guint       m)
+{
+  *y = x;
+  *z = x * 2;
+  *q = g_utf8_strlen (foo, -1) + m;
+}
+
+/**
+ * regress_test_obj_torture_signature_1:
+ * @obj: A #RegressTestObj
+ * @x:
+ * @y: (out):
+ * @z: (out):
+ * @foo:
+ * @q: (out):
+ * @m:
+ * @error: A #GError
+ *
+ * This function throws an error if m is odd.
+ */
+gboolean
+regress_test_obj_torture_signature_1 (RegressTestObj   *obj,
+                              int        x,
+                              double     *y,
+                              int        *z,
+                              const char *foo,
+                              int        *q,
+                              guint       m,
+                              GError    **error)
+{
+  *y = x;
+  *z = x * 2;
+  *q = g_utf8_strlen (foo, -1) + m;
+  if (m % 2 == 0)
+      return TRUE;
+  g_set_error (error, G_IO_ERROR, G_IO_ERROR_FAILED, "m is odd");
+  return FALSE;
+}
+
+/**
+ * regress_test_obj_do_matrix:
+ * @obj: A #RegressTestObj
+ * @somestr: Meaningless string
+ *
+ * This method is virtual.  Notably its name differs from the virtual
+ * slot name, which makes it useful for testing bindings handle this
+ * case.
+ *
+ * Virtual: matrix
+ */
+int
+regress_test_obj_do_matrix (RegressTestObj *obj, const char *somestr)
+{
+  return REGRESS_TEST_OBJ_GET_CLASS (obj)->matrix (obj, somestr);
+}
+
+/**
+ * regress_test_obj_null_in:
+ * @obj: (allow-none): A #RegressTestObj
+ */
+void
+regress_test_obj_null_in (RegressTestObj *obj)
+{
+}
+
+/**
+ * regress_test_obj_null_out:
+ * @obj: (allow-none) (out): A #RegressTestObj
+ */
+void
+regress_test_obj_null_out (RegressTestObj **obj)
+{
+  if (obj)
+    *obj = NULL;
+}
+
+typedef struct _CallbackInfo CallbackInfo;
+
+struct _CallbackInfo
+{
+  RegressTestCallbackUserData callback;
+  GDestroyNotify notify;
+  gpointer user_data;
+};
+
+
+G_DEFINE_TYPE(RegressTestSubObj, regress_test_sub_obj, REGRESS_TEST_TYPE_OBJ);
+
+static void
+regress_test_sub_obj_class_init (RegressTestSubObjClass *klass)
+{
+}
+
+static void
+regress_test_sub_obj_init (RegressTestSubObj *obj)
+{
+}
+
+RegressTestSubObj*
+regress_test_sub_obj_new ()
+{
+  return g_object_new (REGRESS_TEST_TYPE_SUB_OBJ, NULL);
+}
+
+int
+regress_test_sub_obj_instance_method (RegressTestSubObj *obj)
+{
+    return 0;
+}
+
+void
+regress_test_sub_obj_unset_bare (RegressTestSubObj *obj)
+{
+  regress_test_obj_set_bare(REGRESS_TEST_OBJECT(obj), NULL);
+}
+
+/* RegressTestFundamental */
+
+/**
+ * regress_test_fundamental_object_ref:
+ *
+ * Returns: (transfer full): A new #RegressTestFundamentalObject
+ */
+RegressTestFundamentalObject *
+regress_test_fundamental_object_ref (RegressTestFundamentalObject * fundamental_object)
+{
+  g_return_val_if_fail (fundamental_object != NULL, NULL);
+  g_atomic_int_inc (&fundamental_object->refcount);
+
+  return fundamental_object;
+}
+
+static void
+regress_test_fundamental_object_free (RegressTestFundamentalObject * fundamental_object)
+{
+  RegressTestFundamentalObjectClass *mo_class;
+  regress_test_fundamental_object_ref (fundamental_object);
+
+  mo_class = REGRESS_TEST_FUNDAMENTAL_OBJECT_GET_CLASS (fundamental_object);
+  mo_class->finalize (fundamental_object);
+
+  if (G_LIKELY (g_atomic_int_dec_and_test (&fundamental_object->refcount))) {
+    g_type_free_instance ((GTypeInstance *) fundamental_object);
+  }
+}
+
+void
+regress_test_fundamental_object_unref (RegressTestFundamentalObject * fundamental_object)
+{
+  g_return_if_fail (fundamental_object != NULL);
+  g_return_if_fail (fundamental_object->refcount > 0);
+
+  if (G_UNLIKELY (g_atomic_int_dec_and_test (&fundamental_object->refcount))) {
+    regress_test_fundamental_object_free (fundamental_object);
+  }
+}
+
+static void
+regress_test_fundamental_object_replace (RegressTestFundamentalObject ** olddata, RegressTestFundamentalObject * newdata)
+{
+  RegressTestFundamentalObject *olddata_val;
+
+  g_return_if_fail (olddata != NULL);
+
+  olddata_val = g_atomic_pointer_get ((gpointer *) olddata);
+
+  if (olddata_val == newdata)
+    return;
+
+  if (newdata)
+    regress_test_fundamental_object_ref (newdata);
+
+  while (!g_atomic_pointer_compare_and_exchange ((gpointer *) olddata,
+          olddata_val, newdata)) {
+    olddata_val = g_atomic_pointer_get ((gpointer *) olddata);
+  }
+
+  if (olddata_val)
+    regress_test_fundamental_object_unref (olddata_val);
+}
+
+static void
+regress_test_value_fundamental_object_init (GValue * value)
+{
+  value->data[0].v_pointer = NULL;
+}
+
+static void
+regress_test_value_fundamental_object_free (GValue * value)
+{
+  if (value->data[0].v_pointer) {
+    regress_test_fundamental_object_unref (REGRESS_TEST_FUNDAMENTAL_OBJECT_CAST (value->data[0].v_pointer));
+  }
+}
+
+static void
+regress_test_value_fundamental_object_copy (const GValue * src_value, GValue * dest_value)
+{
+  if (src_value->data[0].v_pointer) {
+    dest_value->data[0].v_pointer =
+        regress_test_fundamental_object_ref (REGRESS_TEST_FUNDAMENTAL_OBJECT_CAST (src_value->data[0].
+            v_pointer));
+  } else {
+    dest_value->data[0].v_pointer = NULL;
+  }
+}
+
+static gpointer
+regress_test_value_fundamental_object_peek_pointer (const GValue * value)
+{
+  return value->data[0].v_pointer;
+}
+
+static gchar *
+regress_test_value_fundamental_object_collect (GValue * value,
+                                       guint n_collect_values,
+                                       GTypeCValue * collect_values,
+                                       guint collect_flags)
+{
+  if (collect_values[0].v_pointer) {
+    value->data[0].v_pointer =
+        regress_test_fundamental_object_ref (collect_values[0].v_pointer);
+  } else {
+    value->data[0].v_pointer = NULL;
+  }
+
+  return NULL;
+}
+
+static gchar *
+regress_test_value_fundamental_object_lcopy (const GValue * value,
+                                     guint n_collect_values,
+                                     GTypeCValue * collect_values,
+                                     guint collect_flags)
+{
+  gpointer *fundamental_object_p = collect_values[0].v_pointer;
+
+  if (!fundamental_object_p) {
+    return g_strdup_printf ("value location for '%s' passed as NULL",
+        G_VALUE_TYPE_NAME (value));
+  }
+
+  if (!value->data[0].v_pointer)
+    *fundamental_object_p = NULL;
+  else if (collect_flags & G_VALUE_NOCOPY_CONTENTS)
+    *fundamental_object_p = value->data[0].v_pointer;
+  else
+    *fundamental_object_p = regress_test_fundamental_object_ref (value->data[0].v_pointer);
+
+  return NULL;
+}
+
+static void
+regress_test_fundamental_object_finalize (RegressTestFundamentalObject * obj)
+{
+
+}
+
+static RegressTestFundamentalObject *
+regress_test_fundamental_object_copy_default (const RegressTestFundamentalObject * obj)
+{
+  g_warning ("RegressTestFundamentalObject classes must implement RegressTestFundamentalObject::copy");
+  return NULL;
+}
+
+static void
+regress_test_fundamental_object_class_init (gpointer g_class, gpointer class_data)
+{
+  RegressTestFundamentalObjectClass *mo_class = REGRESS_TEST_FUNDAMENTAL_OBJECT_CLASS (g_class);
+
+  mo_class->copy = regress_test_fundamental_object_copy_default;
+  mo_class->finalize = regress_test_fundamental_object_finalize;
+}
+
+static void
+regress_test_fundamental_object_init (GTypeInstance * instance, gpointer klass)
+{
+  RegressTestFundamentalObject *fundamental_object = REGRESS_TEST_FUNDAMENTAL_OBJECT_CAST (instance);
+
+  fundamental_object->refcount = 1;
+}
+
+/**
+ * RegressTestFundamentalObject:
+ *
+ * Ref Func: regress_test_fundamental_object_ref
+ * Unref Func: regress_test_fundamental_object_unref
+ * Set Value Func: regress_test_value_set_fundamental_object
+ * Get Value Func: regress_test_value_get_fundamental_object
+ */
+
+GType
+regress_test_fundamental_object_get_type (void)
+{
+  static GType _test_fundamental_object_type = 0;
+
+  if (G_UNLIKELY (_test_fundamental_object_type == 0)) {
+    static const GTypeValueTable value_table = {
+      regress_test_value_fundamental_object_init,
+      regress_test_value_fundamental_object_free,
+      regress_test_value_fundamental_object_copy,
+      regress_test_value_fundamental_object_peek_pointer,
+      (char *) "p",
+      regress_test_value_fundamental_object_collect,
+      (char *) "p",
+      regress_test_value_fundamental_object_lcopy
+    };
+    static const GTypeInfo fundamental_object_info = {
+      sizeof (RegressTestFundamentalObjectClass),
+      NULL, NULL,
+      regress_test_fundamental_object_class_init,
+      NULL,
+      NULL,
+      sizeof (RegressTestFundamentalObject),
+      0,
+      (GInstanceInitFunc) regress_test_fundamental_object_init,
+      &value_table
+    };
+    static const GTypeFundamentalInfo fundamental_object_fundamental_info = {
+      (G_TYPE_FLAG_CLASSED | G_TYPE_FLAG_INSTANTIATABLE |
+          G_TYPE_FLAG_DERIVABLE | G_TYPE_FLAG_DEEP_DERIVABLE)
+    };
+
+    _test_fundamental_object_type = g_type_fundamental_next ();
+    g_type_register_fundamental (_test_fundamental_object_type, "RegressTestFundamentalObject",
+        &fundamental_object_info, &fundamental_object_fundamental_info, G_TYPE_FLAG_ABSTRACT);
+
+  }
+
+  return _test_fundamental_object_type;
+}
+
+/**
+ * regress_test_value_set_fundamental_object: (skip)
+ * @value:
+ * @fundamental_object:
+ */
+void
+regress_test_value_set_fundamental_object (GValue * value, RegressTestFundamentalObject * fundamental_object)
+{
+  gpointer *pointer_p;
+
+  g_return_if_fail (REGRESS_TEST_VALUE_HOLDS_FUNDAMENTAL_OBJECT (value));
+  g_return_if_fail (fundamental_object == NULL || REGRESS_TEST_IS_FUNDAMENTAL_OBJECT (fundamental_object));
+
+  pointer_p = &value->data[0].v_pointer;
+
+  regress_test_fundamental_object_replace ((RegressTestFundamentalObject **) pointer_p, fundamental_object);
+}
+
+/**
+ * regress_test_value_get_fundamental_object: (skip)
+ * @value:
+ */
+RegressTestFundamentalObject *
+regress_test_value_get_fundamental_object (const GValue * value)
+{
+  g_return_val_if_fail (REGRESS_TEST_VALUE_HOLDS_FUNDAMENTAL_OBJECT (value), NULL);
+
+  return value->data[0].v_pointer;
+}
+
+static RegressTestFundamentalObjectClass *parent_class = NULL;
+
+G_DEFINE_TYPE (RegressTestFundamentalSubObject, regress_test_fundamental_sub_object, REGRESS_TEST_TYPE_FUNDAMENTAL_OBJECT);
+
+static RegressTestFundamentalSubObject *
+_regress_test_fundamental_sub_object_copy (RegressTestFundamentalSubObject * fundamental_sub_object)
+{
+  RegressTestFundamentalSubObject *copy;
+
+  copy = regress_test_fundamental_sub_object_new(NULL);
+  copy->data = g_strdup(fundamental_sub_object->data);
+  return copy;
+}
+
+static void
+regress_test_fundamental_sub_object_finalize (RegressTestFundamentalSubObject * fundamental_sub_object)
+{
+  g_return_if_fail (fundamental_sub_object != NULL);
+
+  g_free(fundamental_sub_object->data);
+  regress_test_fundamental_object_unref (REGRESS_TEST_FUNDAMENTAL_OBJECT (fundamental_sub_object));
+}
+
+static void
+regress_test_fundamental_sub_object_class_init (RegressTestFundamentalSubObjectClass * klass)
+{
+  parent_class = g_type_class_peek_parent (klass);
+
+  klass->fundamental_object_class.copy = (RegressTestFundamentalObjectCopyFunction) _regress_test_fundamental_sub_object_copy;
+  klass->fundamental_object_class.finalize =
+      (RegressTestFundamentalObjectFinalizeFunction) regress_test_fundamental_sub_object_finalize;
+}
+
+static void
+regress_test_fundamental_sub_object_init(RegressTestFundamentalSubObject *object)
+{
+
+}
+
+/**
+ * regress_test_fundamental_sub_object_new:
+ */
+RegressTestFundamentalSubObject *
+regress_test_fundamental_sub_object_new (const char * data)
+{
+  RegressTestFundamentalSubObject *object;
+
+  object = (RegressTestFundamentalSubObject *) g_type_create_instance (regress_test_fundamental_sub_object_get_type());
+  object->data = g_strdup(data);
+  return object;
+}
+
+
+/**
+ * regress_test_callback:
+ * @callback: (scope call) (allow-none):
+ *
+ **/
+int
+regress_test_callback (RegressTestCallback callback)
+{
+    if (callback != NULL)
+        return callback();
+    return 0;
+}
+
+/**
+ * regress_test_multi_callback:
+ * @callback: (scope call) (allow-none):
+ *
+ **/
+int
+regress_test_multi_callback (RegressTestCallback callback)
+{
+    int sum = 0;
+    if (callback != NULL) {
+        sum += callback();
+        sum += callback();
+    }
+
+    return sum;
+}
+
+
+
+/**
+ * regress_test_simple_callback:
+ * @callback: (scope call) (allow-none):
+ *
+ **/
+void
+regress_test_simple_callback (RegressTestSimpleCallback callback)
+{
+    if (callback != NULL)
+        callback();
+
+    return;
+}
+
+/**
+ * regress_test_callback_user_data:
+ * @callback: (scope call):
+ *
+ * Call - callback parameter persists for the duration of the method
+ * call and can be released on return.
+ **/
+int
+regress_test_callback_user_data (RegressTestCallbackUserData callback,
+                         gpointer user_data)
+{
+  return callback(user_data);
+}
+
+static GSList *notified_callbacks = NULL;
+
+/**
+ * regress_test_callback_destroy_notify:
+ * @callback: (scope notified):
+ *
+ * Notified - callback persists until a DestroyNotify delegate
+ * is invoked.
+ **/
+int
+regress_test_callback_destroy_notify (RegressTestCallbackUserData callback,
+                              gpointer user_data,
+                              GDestroyNotify notify)
+{
+  int retval;
+  CallbackInfo *info;
+
+  retval = callback(user_data);
+
+  info = g_slice_new(CallbackInfo);
+  info->callback = callback;
+  info->notify = notify;
+  info->user_data = user_data;
+
+  notified_callbacks = g_slist_prepend(notified_callbacks, info);
+
+  return retval;
+}
+
+/**
+ * regress_test_callback_thaw_notifications:
+ *
+ * Invokes all callbacks installed by #test_callback_destroy_notify(),
+ * adding up their return values, and removes them, invoking the
+ * corresponding destroy notfications.
+ *
+ * Return value: Sum of the return values of the invoked callbacks.
+ */
+int
+regress_test_callback_thaw_notifications (void)
+{
+  int retval = 0;
+  GSList *node;
+
+  for (node = notified_callbacks; node != NULL; node = node->next)
+    {
+      CallbackInfo *info = node->data;
+      retval += info->callback (info->user_data);
+      if (info->notify)
+        info->notify (info->user_data);
+      g_slice_free (CallbackInfo, info);
+    }
+
+  g_slist_free (notified_callbacks);
+  notified_callbacks = NULL;
+
+  return retval;
+}
+
+static GSList *async_callbacks = NULL;
+
+/**
+ * regress_test_callback_async:
+ * @callback: (scope async):
+ *
+ **/
+void
+regress_test_callback_async (RegressTestCallbackUserData callback,
+                     gpointer user_data)
+{
+  CallbackInfo *info;
+
+  info = g_slice_new(CallbackInfo);
+  info->callback = callback;
+  info->user_data = user_data;
+
+  async_callbacks = g_slist_prepend(async_callbacks, info);
+}
+
+/**
+ * regress_test_callback_thaw_async:
+ */
+int
+regress_test_callback_thaw_async (void)
+{
+  int retval = 0;
+  GSList *node;
+
+  for (node = async_callbacks; node != NULL; node = node->next)
+    {
+      CallbackInfo *info = node->data;
+      retval = info->callback (info->user_data);
+      g_slice_free (CallbackInfo, info);
+    }
+
+  g_slist_free (async_callbacks);
+  async_callbacks = NULL;
+  return retval;
+}
+
+void
+regress_test_async_ready_callback (GAsyncReadyCallback callback)
+{
+  GSimpleAsyncResult *result = g_simple_async_result_new (NULL, callback, NULL,
+    regress_test_async_ready_callback);
+  g_simple_async_result_complete_in_idle (result);
+}
+
+/**
+ * regress_test_obj_instance_method_callback:
+ * @callback: (scope call) (allow-none):
+ *
+ **/
+void
+regress_test_obj_instance_method_callback (RegressTestObj *obj, RegressTestCallback callback)
+{
+    if (callback != NULL)
+        callback();
+}
+
+/**
+ * regress_test_obj_static_method_callback:
+ * @callback: (scope call) (allow-none):
+ *
+ **/
+void
+regress_test_obj_static_method_callback (RegressTestCallback callback)
+{
+    if (callback != NULL)
+        callback();
+}
+
+/**
+ * regress_test_obj_new_callback:
+ * @callback: (scope notified):
+ **/
+RegressTestObj *
+regress_test_obj_new_callback (RegressTestCallbackUserData callback, gpointer user_data,
+                       GDestroyNotify notify)
+{
+  CallbackInfo *info;
+
+  callback(user_data);
+
+  info = g_slice_new(CallbackInfo);
+  info->callback = callback;
+  info->notify = notify;
+  info->user_data = user_data;
+
+  notified_callbacks = g_slist_prepend(notified_callbacks, info);
+
+  return g_object_new (REGRESS_TEST_TYPE_OBJ, NULL);
+}
+
+/* interface */
+
+static void
+regress_test_interface_class_init(void *g_iface)
+{
+}
+
+GType
+regress_test_interface_get_type(void)
+{
+    static GType type = 0;
+    if (type == 0) {
+        type = g_type_register_static_simple (G_TYPE_INTERFACE,
+                                              "RegressTestInterface",
+                                              sizeof (RegressTestInterfaceIface),
+                                              (GClassInitFunc) regress_test_interface_class_init,
+                                              0, NULL, 0);
+    }
+
+    return type;
+}
+
+/* gobject with non-standard prefix */
+G_DEFINE_TYPE(RegressTestWi8021x, regress_test_wi_802_1x, G_TYPE_OBJECT);
+
+enum
+{
+  PROP_TEST_WI_802_1X_TESTBOOL = 1
+};
+
+static void
+regress_test_wi_802_1x_set_property (GObject      *object,
+                             guint         property_id,
+                             const GValue *value,
+                             GParamSpec   *pspec)
+{
+  RegressTestWi8021x *self = REGRESS_TEST_WI_802_1X (object);
+
+  switch (property_id)
+    {
+    case PROP_TEST_WI_802_1X_TESTBOOL:
+      regress_test_wi_802_1x_set_testbool (self, g_value_get_boolean (value));
+      break;
+
+    default:
+      /* We don't have any other property... */
+      G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
+      break;
+    }
+}
+
+static void
+regress_test_wi_802_1x_get_property (GObject    *object,
+                        guint       property_id,
+                        GValue     *value,
+                        GParamSpec *pspec)
+{
+  RegressTestWi8021x *self = REGRESS_TEST_WI_802_1X (object);
+
+  switch (property_id)
+    {
+    case PROP_TEST_WI_802_1X_TESTBOOL:
+      g_value_set_boolean (value, regress_test_wi_802_1x_get_testbool (self));
+      break;
+
+    default:
+      /* We don't have any other property... */
+      G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
+      break;
+    }
+}
+
+static void
+regress_test_wi_802_1x_dispose (GObject *gobject)
+{
+  /* Chain up to the parent class */
+  G_OBJECT_CLASS (regress_test_wi_802_1x_parent_class)->dispose (gobject);
+}
+
+static void
+regress_test_wi_802_1x_class_init (RegressTestWi8021xClass *klass)
+{
+  GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
+  GParamSpec *pspec;
+
+  gobject_class->set_property = regress_test_wi_802_1x_set_property;
+  gobject_class->get_property = regress_test_wi_802_1x_get_property;
+  gobject_class->dispose = regress_test_wi_802_1x_dispose;
+
+  pspec = g_param_spec_boolean ("testbool",
+                                "Nick for testbool",
+                                "Blurb for testbool",
+                                TRUE,
+                                G_PARAM_READWRITE);
+  g_object_class_install_property (gobject_class,
+                                   PROP_TEST_WI_802_1X_TESTBOOL,
+                                   pspec);
+}
+
+static void
+regress_test_wi_802_1x_init (RegressTestWi8021x *obj)
+{
+  obj->testbool = TRUE;
+}
+
+RegressTestWi8021x *
+regress_test_wi_802_1x_new (void)
+{
+  return g_object_new (REGRESS_TEST_TYPE_WI_802_1X, NULL);
+}
+
+void
+regress_test_wi_802_1x_set_testbool (RegressTestWi8021x *obj, gboolean val)
+{
+  obj->testbool = val;
+}
+
+gboolean
+regress_test_wi_802_1x_get_testbool (RegressTestWi8021x *obj)
+{
+  return obj->testbool;
+}
+
+int
+regress_test_wi_802_1x_static_method (int x)
+{
+  return 2*x;
+}
+
+/* floating gobject */
+G_DEFINE_TYPE(RegressTestFloating, regress_test_floating, G_TYPE_INITIALLY_UNOWNED);
+
+static void
+regress_test_floating_finalize(GObject *object)
+{
+  g_assert(!g_object_is_floating (object));
+
+  G_OBJECT_CLASS(regress_test_floating_parent_class)->finalize(object);
+}
+
+static void
+regress_test_floating_class_init (RegressTestFloatingClass *klass)
+{
+  GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
+  gobject_class->finalize = regress_test_floating_finalize;
+}
+
+static void
+regress_test_floating_init (RegressTestFloating *obj)
+{
+}
+
+/**
+ * regress_test_floating_new:
+ *
+ * Returns:: A new floating #RegressTestFloating
+ */
+RegressTestFloating *
+regress_test_floating_new (void)
+{
+  return g_object_new (REGRESS_TEST_TYPE_FLOATING, NULL);
+}
+
+
+/**
+ * regress_test_torture_signature_0:
+ * @x:
+ * @y: (out):
+ * @z: (out):
+ * @foo:
+ * @q: (out):
+ * @m:
+ *
+ */
+void
+regress_test_torture_signature_0 (int         x,
+                          double     *y,
+                          int        *z,
+                          const char *foo,
+                          int        *q,
+                          guint       m)
+{
+  *y = x;
+  *z = x * 2;
+  *q = g_utf8_strlen (foo, -1) + m;
+}
+
+/**
+ * regress_test_torture_signature_1:
+ * @x:
+ * @y: (out):
+ * @z: (out):
+ * @foo:
+ * @q: (out):
+ * @m:
+ * @error: A #GError
+ *
+ * This function throws an error if m is odd.
+ */
+gboolean
+regress_test_torture_signature_1 (int         x,
+                          double     *y,
+                          int        *z,
+                          const char *foo,
+                          int        *q,
+                          guint       m,
+                          GError    **error)
+{
+  *y = x;
+  *z = x * 2;
+  *q = g_utf8_strlen (foo, -1) + m;
+  if (m % 2 == 0)
+      return TRUE;
+  g_set_error (error, G_IO_ERROR, G_IO_ERROR_FAILED, "m is odd");
+  return FALSE;
+}
+
+/**
+ * regress_test_torture_signature_2:
+ * @x:
+ * @callback:
+ * @user_data:
+ * @notify:
+ * @y: (out):
+ * @z: (out):
+ * @foo:
+ * @q: (out):
+ * @m:
+ *
+ */
+void
+regress_test_torture_signature_2 (int                   x,
+                          RegressTestCallbackUserData  callback,
+                          gpointer              user_data,
+                          GDestroyNotify        notify,
+                          double               *y,
+                          int                  *z,
+                          const char           *foo,
+                          int                  *q,
+                          guint                 m)
+{
+  *y = x;
+  *z = x * 2;
+  *q = g_utf8_strlen (foo, -1) + m;
+  notify (user_data);
+}
+
+/**
+ * regress_test_date_in_gvalue:
+ *
+ * Returns: (transfer full):
+ */
+GValue *
+regress_test_date_in_gvalue (void)
+{
+  GValue *value = g_new0 (GValue, 1);
+  GDate *date = g_date_new_dmy (5, 12, 1984);
+
+  g_value_init (value, G_TYPE_DATE);
+  g_value_take_boxed (value, date);
+
+  return value;
+}
+
+/**
+ * regress_test_strv_in_gvalue:
+ *
+ * Returns: (transfer full):
+ */
+GValue *
+regress_test_strv_in_gvalue (void)
+{
+  GValue *value = g_new0 (GValue, 1);
+  const char *strv[] = { "one", "two", "three", NULL };
+
+  g_value_init (value, G_TYPE_STRV);
+  g_value_set_boxed (value, strv);
+
+  return value;
+}
diff --git a/tests/scanner/regress.h b/tests/scanner/regress.h
new file mode 100644
index 0000000..5911712
--- /dev/null
+++ b/tests/scanner/regress.h
@@ -0,0 +1,506 @@
+#ifndef __GITESTTYPES_H__
+#define __GITESTTYPES_H__
+
+#include <cairo/cairo.h>
+#include <glib-object.h>
+#include <gio/gio.h>
+#include <time.h>
+
+void regress_set_abort_on_error (gboolean abort_on_error);
+
+/* basic types */
+gboolean regress_test_boolean (gboolean in);
+gboolean regress_test_boolean_true (gboolean in);
+gboolean regress_test_boolean_false (gboolean in);
+gint8 regress_test_int8 (gint8 in);
+guint8 regress_test_uint8 (guint8 in);
+gint16 regress_test_int16 (gint16 in);
+guint16 regress_test_uint16 (guint16 in);
+gint32 regress_test_int32 (gint32 in);
+guint32 regress_test_uint32 (guint32 in);
+gint64 regress_test_int64 (gint64 in);
+guint64 regress_test_uint64 (guint64 in);
+gshort regress_test_short (gshort in);
+gushort regress_test_ushort (gushort in);
+gint regress_test_int (gint in);
+guint regress_test_uint (guint in);
+glong regress_test_long (glong in);
+gulong regress_test_ulong (gulong in);
+gssize regress_test_ssize (gssize in);
+gsize regress_test_size (gsize in);
+gfloat regress_test_float (gfloat in);
+gdouble regress_test_double (gdouble in);
+time_t regress_test_timet (time_t in);
+GType regress_test_gtype (GType in);
+
+/* utf8 */
+G_CONST_RETURN char *regress_test_utf8_const_return (void);
+char *regress_test_utf8_nonconst_return (void);
+void regress_test_utf8_nonconst_in (char *in);
+void regress_test_utf8_const_in (const char *in);
+void regress_test_utf8_out (char **out);
+void regress_test_utf8_inout (char **inout);
+GSList *regress_test_filename_return (void);
+void regress_test_utf8_null_in (char *in);
+void regress_test_utf8_null_out (char **char_out);
+
+/* in arguments after out arguments */
+void regress_test_int_out_utf8 (int *length, const char *in);
+
+/* multiple output arguments */
+void regress_test_multi_double_args (gdouble in, gdouble *one, gdouble *two);
+void regress_test_utf8_out_out (char **out0, char **out1);
+char *regress_test_utf8_out_nonconst_return (char **out);
+
+/* non-basic-types */
+/* array */
+gboolean regress_test_strv_in (char **arr);
+int regress_test_array_int_in (int n_ints, int *ints);
+void regress_test_array_int_out (int *n_ints, int **ints);
+void regress_test_array_int_inout (int *n_ints, int **ints);
+int regress_test_array_gint8_in (int n_ints, gint8 *ints);
+int regress_test_array_gint16_in (int n_ints, gint16 *ints);
+gint32 regress_test_array_gint32_in (int n_ints, gint32 *ints);
+gint64 regress_test_array_gint64_in (int n_ints, gint64 *ints);
+char *regress_test_array_gtype_in (int n_types, GType *types);
+char **regress_test_strv_out_container (void);
+char **regress_test_strv_out (void);
+const char * const * regress_test_strv_out_c (void);
+void   regress_test_strv_outarg (char ***retp);
+int regress_test_array_fixed_size_int_in (int *ints);
+void regress_test_array_fixed_size_int_out (int **ints);
+int *regress_test_array_fixed_size_int_return (void);
+
+/* transfer tests */
+int regress_test_array_int_in_take (int n_ints, int *ints);
+gboolean regress_test_strv_in_container (char **arr);
+
+int *regress_test_array_int_full_out(int *len);
+int *regress_test_array_int_none_out(int *len);
+void regress_test_array_int_null_in (int *arr, int len);
+void regress_test_array_int_null_out (int **arr, int *len);
+
+/* interface */
+/* GList */
+G_CONST_RETURN GList *regress_test_glist_nothing_return (void);
+GList *regress_test_glist_nothing_return2 (void);
+GList *regress_test_glist_container_return (void);
+GList *regress_test_glist_everything_return (void);
+void regress_test_glist_nothing_in (const GList *in);
+void regress_test_glist_nothing_in2 (GList *in);
+void regress_test_glist_container_in (GList *in);
+void regress_test_glist_everything_in (GList *in);
+void regress_test_glist_null_in(GSList *in);
+void regress_test_glist_null_out(GSList **out_list);
+void regress_test_glist_free (GList *in);
+
+/* GSList */
+G_CONST_RETURN GSList *regress_test_gslist_nothing_return (void);
+GSList *regress_test_gslist_nothing_return2 (void);
+GSList *regress_test_gslist_container_return (void);
+GSList *regress_test_gslist_everything_return (void);
+void regress_test_gslist_nothing_in (const GSList *in);
+void regress_test_gslist_nothing_in2 (GSList *in);
+void regress_test_gslist_container_in (GSList *in);
+void regress_test_gslist_everything_in (GSList *in);
+void regress_test_gslist_null_in(GSList *in);
+void regress_test_gslist_null_out(GSList **out_list);
+void regress_test_gslist_free (GSList *in);
+
+/* GHashTable */
+G_CONST_RETURN GHashTable *regress_test_ghash_null_return (void);
+G_CONST_RETURN GHashTable *regress_test_ghash_nothing_return (void);
+GHashTable *regress_test_ghash_nothing_return2 (void);
+GHashTable *regress_test_ghash_container_return (void);
+GHashTable *regress_test_ghash_everything_return (void);
+void regress_test_ghash_null_in (const GHashTable *in);
+void regress_test_ghash_null_out (const GHashTable **out);
+void regress_test_ghash_nothing_in (const GHashTable *in);
+void regress_test_ghash_nothing_in2 (GHashTable *in);
+void regress_test_ghash_container_in (GHashTable *in);
+void regress_test_ghash_everything_in (GHashTable *in);
+void regress_test_ghash_free (GHashTable *in);
+GHashTable *regress_test_ghash_nested_everything_return (void);
+GHashTable *regress_test_ghash_nested_everything_return2 (void);
+
+/* error? */
+
+/* closure */
+int regress_test_closure (GClosure *closure);
+int regress_test_closure_one_arg (GClosure *closure, int arg);
+
+/* value */
+int regress_test_int_value_arg(const GValue *v);
+const GValue *regress_test_value_return(int i);
+
+/* foreign structs */
+cairo_t *regress_test_cairo_context_full_return (void);
+void regress_test_cairo_context_none_in (cairo_t *context);
+
+cairo_surface_t *regress_test_cairo_surface_none_return (void);
+cairo_surface_t *regress_test_cairo_surface_full_return (void);
+void regress_test_cairo_surface_none_in (cairo_surface_t *surface);
+void regress_test_cairo_surface_full_out (cairo_surface_t **surface);
+
+
+/* enums / flags */
+
+typedef enum
+{
+  REGRESS_TEST_VALUE1,
+  REGRESS_TEST_VALUE2,
+  REGRESS_TEST_VALUE3 = 42
+} RegressTestEnum;
+
+typedef enum
+{
+  REGRESS_TEST_FLAG1 = 1 << 0,
+  REGRESS_TEST_FLAG2 = 1 << 1,
+  REGRESS_TEST_FLAG3 = 1 << 2,
+} RegressTestFlags;
+
+GType regress_test_enum_get_type (void) G_GNUC_CONST;
+#define REGRESS_TEST_TYPE_ENUM (regress_test_enum_get_type ())
+GType regress_test_flags_get_type (void) G_GNUC_CONST;
+#define REGRESS_TEST_TYPE_FLAGS (regress_test_flags_get_type ())
+
+const gchar * regress_test_enum_param(RegressTestEnum e);
+
+/* structures */
+typedef struct _RegressTestStructA RegressTestStructA;
+typedef struct _RegressTestStructB RegressTestStructB;
+
+struct _RegressTestStructA
+{
+  gint some_int;
+  gint8 some_int8;
+  gdouble some_double;
+  RegressTestEnum some_enum;
+};
+
+void regress_test_struct_a_clone (RegressTestStructA *a,
+				  RegressTestStructA *a_out);
+
+struct _RegressTestStructB
+{
+  gint8 some_int8;
+  RegressTestStructA nested_a;
+};
+
+void regress_test_struct_b_clone (RegressTestStructB *b,
+			  RegressTestStructB *b_out);
+
+/* This one has a non-basic member */
+struct _RegressTestStructC
+{
+  gint another_int;
+  GObject *obj;
+};
+
+/* plain-old-data boxed types */
+typedef struct _RegressTestSimpleBoxedA RegressTestSimpleBoxedA;
+typedef struct _RegressTestSimpleBoxedB RegressTestSimpleBoxedB;
+
+struct _RegressTestSimpleBoxedA
+{
+  gint some_int;
+  gint8 some_int8;
+  gdouble some_double;
+  RegressTestEnum some_enum;
+};
+
+GType                   regress_test_simple_boxed_a_get_type     (void);
+RegressTestSimpleBoxedA *regress_test_simple_boxed_a_copy         (RegressTestSimpleBoxedA *a);
+gboolean                regress_test_simple_boxed_a_equals       (RegressTestSimpleBoxedA *a,
+                                                          RegressTestSimpleBoxedA *other_a);
+const RegressTestSimpleBoxedA *regress_test_simple_boxed_a_const_return (void);
+
+
+struct _RegressTestSimpleBoxedB
+{
+  gint8 some_int8;
+  RegressTestSimpleBoxedA nested_a;
+};
+
+GType             regress_test_simple_boxed_b_get_type (void);
+RegressTestSimpleBoxedB *regress_test_simple_boxed_b_copy     (RegressTestSimpleBoxedB *b);
+
+/* opaque boxed */
+#define REGRESS_TEST_TYPE_BOXED (regress_test_boxed_get_type())
+
+typedef struct _RegressTestBoxed RegressTestBoxed;
+typedef struct _RegressTestBoxedPrivate RegressTestBoxedPrivate;
+
+struct _RegressTestBoxed
+{
+  gint8 some_int8;
+  RegressTestSimpleBoxedA nested_a;
+
+  RegressTestBoxedPrivate *priv;
+};
+
+GType      regress_test_boxed_get_type (void);
+RegressTestBoxed *regress_test_boxed_new      (void);
+RegressTestBoxed *regress_test_boxed_new_alternative_constructor1  (int i);
+RegressTestBoxed *regress_test_boxed_new_alternative_constructor2  (int i, int j);
+RegressTestBoxed *regress_test_boxed_new_alternative_constructor3  (char *s);
+
+RegressTestBoxed *regress_test_boxed_copy     (RegressTestBoxed *boxed);
+gboolean   regress_test_boxed_equals   (RegressTestBoxed *boxed,
+					RegressTestBoxed *other);
+
+/* gobject */
+#define REGRESS_TEST_TYPE_OBJ              (regress_test_obj_get_type ())
+#define REGRESS_TEST_OBJECT(object)        (G_TYPE_CHECK_INSTANCE_CAST ((object), REGRESS_TEST_TYPE_OBJ, RegressTestObj))
+#define REGRESS_TEST_IS_OBJECT(object)     (G_TYPE_CHECK_INSTANCE_TYPE ((object), REGRESS_TEST_TYPE_OBJ))
+#define REGRESS_TEST_OBJ_GET_CLASS(obj)    (G_TYPE_INSTANCE_GET_CLASS ((obj), REGRESS_TEST_TYPE_OBJ, RegressTestObjClass))
+
+typedef struct _RegressTestObj          RegressTestObj;
+typedef struct _RegressTestObjClass     RegressTestObjClass;
+
+/**
+ * RegressTestObj:
+ * @bare: (allow-none):
+ */
+struct _RegressTestObj
+{
+  GObject parent_instance;
+
+  GObject *bare;
+  RegressTestBoxed *boxed;
+  GHashTable *hash_table;
+  GList *list;
+  gint8 some_int8;
+  float some_float;
+  double some_double;
+  char* string;
+};
+
+struct _RegressTestObjClass
+{
+  GObjectClass parent_class;
+
+  int (*matrix) (RegressTestObj *obj, const char *somestr);
+
+  guint test_signal;
+  guint test_signal_with_static_scope_arg;
+};
+
+GType      regress_test_obj_get_type (void);
+RegressTestObj*   regress_test_obj_new_from_file (const char *x, GError **error);
+void       regress_test_obj_set_bare (RegressTestObj *obj, GObject *bare);
+int        regress_test_obj_instance_method (RegressTestObj *obj);
+double     regress_test_obj_static_method (int x);
+
+void regress_test_obj_torture_signature_0 (RegressTestObj    *obj,
+                                   int        x,
+                                   double     *y,
+                                   int        *z,
+                                   const char *foo,
+                                   int        *q,
+                                   guint       m);
+gboolean regress_test_obj_torture_signature_1 (RegressTestObj    *obj,
+                                       int        x,
+                                       double     *y,
+                                       int        *z,
+                                       const char *foo,
+                                       int        *q,
+                                       guint       m,
+                                       GError    **error);
+
+/* virtual */
+int        regress_test_obj_do_matrix (RegressTestObj *obj, const char *somestr);
+
+void regress_test_obj_null_in (RegressTestObj *obj);
+void regress_test_obj_null_out (RegressTestObj **obj);
+
+/* inheritance */
+#define REGRESS_TEST_TYPE_SUB_OBJ           (regress_test_sub_obj_get_type ())
+#define REGRESS_TEST_SUB_OBJECT(object)     (G_TYPE_CHECK_INSTANCE_CAST ((object), REGRESS_TEST_TYPE_SUB_OBJ, RegressTestSubObj))
+#define REGRESS_TEST_IS_SUB_OBJECT(object)  (G_TYPE_CHECK_INSTANCE_TYPE ((object), REGRESS_TEST_TYPE_SUB_OBJ))
+#define REGRESS_TEST_SUB_OBJ_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), REGRESS_TEST_TYPE_SUB_OBJ, RegressTestSubObjClass))
+
+typedef struct _RegressTestSubObj         RegressTestSubObj;
+typedef struct _RegressTestSubObjClass    RegressTestSubObjClass;
+
+struct _RegressTestSubObj
+{
+  RegressTestObj parent_instance;
+};
+
+struct _RegressTestSubObjClass
+{
+  RegressTestObjClass parent_class;
+};
+
+GType       regress_test_sub_obj_get_type (void);
+RegressTestSubObj* regress_test_sub_obj_new (void);
+void        regress_test_sub_obj_unset_bare (RegressTestSubObj *obj);
+int         regress_test_sub_obj_instance_method (RegressTestSubObj *obj);
+
+/* fundamental object */
+#define REGRESS_TEST_TYPE_FUNDAMENTAL_OBJECT            (regress_test_fundamental_object_get_type())
+#define REGRESS_TEST_IS_FUNDAMENTAL_OBJECT(obj)         (G_TYPE_CHECK_INSTANCE_TYPE ((obj), REGRESS_TEST_TYPE_FUNDAMENTAL_OBJECT))
+#define REGRESS_TEST_IS_FUNDAMENTAL_OBJECT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), REGRESS_TEST_TYPE_FUNDAMENTAL_OBJECT))
+#define REGRESS_TEST_FUNDAMENTAL_OBJECT_GET_CLASS(obj)  (G_TYPE_INSTANCE_GET_CLASS ((obj), REGRESS_TEST_TYPE_FUNDAMENTAL_OBJECT, RegressTestFundamentalObjectClass))
+#define REGRESS_TEST_FUNDAMENTAL_OBJECT(obj)            (G_TYPE_CHECK_INSTANCE_CAST ((obj), REGRESS_TEST_TYPE_FUNDAMENTAL_OBJECT, RegressTestFundamentalObject))
+#define REGRESS_TEST_FUNDAMENTAL_OBJECT_CLASS(klass)    (G_TYPE_CHECK_CLASS_CAST ((klass), REGRESS_TEST_TYPE_FUNDAMENTAL_OBJECT, RegressTestFundamentalObjectClass))
+#define REGRESS_TEST_FUNDAMENTAL_OBJECT_CAST(obj)       ((RegressTestFundamentalObject*)(obj))
+
+typedef struct _RegressTestFundamentalObject RegressTestFundamentalObject;
+typedef struct _RegressTestFundamentalObjectClass RegressTestFundamentalObjectClass;
+typedef RegressTestFundamentalObject * (*RegressTestFundamentalObjectCopyFunction) (const RegressTestFundamentalObject *obj);
+typedef void (*RegressTestFundamentalObjectFinalizeFunction) (RegressTestFundamentalObject *obj);
+
+
+struct _RegressTestFundamentalObject {
+  GTypeInstance instance;
+  gint refcount;
+  guint flags;
+};
+
+struct _RegressTestFundamentalObjectClass {
+  GTypeClass type_class;
+
+  RegressTestFundamentalObjectCopyFunction copy;
+  RegressTestFundamentalObjectFinalizeFunction finalize;
+};
+
+GType 		       regress_test_fundamental_object_get_type (void);
+RegressTestFundamentalObject* regress_test_fundamental_object_ref      (RegressTestFundamentalObject *fundamental_object);
+void 		       regress_test_fundamental_object_unref 	(RegressTestFundamentalObject *fundamental_object);
+
+#define REGRESS_TEST_VALUE_HOLDS_FUNDAMENTAL_OBJECT(value)  (G_VALUE_HOLDS(value, REGRESS_TEST_TYPE_FUNDAMENTAL_OBJECT))
+
+void 		       regress_test_value_set_fundamental_object (GValue *value, RegressTestFundamentalObject *fundamental_object);
+RegressTestFundamentalObject* regress_test_value_get_fundamental_object (const GValue *value);
+
+typedef struct _RegressTestFundamentalSubObject RegressTestFundamentalSubObject;
+typedef struct _RegressTestFundamentalSubObjectClass RegressTestFundamentalSubObjectClass;
+
+struct _RegressTestFundamentalSubObject
+{
+  RegressTestFundamentalObject fundamental_object;
+  char *data;
+};
+
+struct _RegressTestFundamentalSubObjectClass {
+  RegressTestFundamentalObjectClass fundamental_object_class;
+};
+
+GType regress_test_fundamental_sub_object_get_type(void);
+
+RegressTestFundamentalSubObject *
+regress_test_fundamental_sub_object_new (const char *data);
+
+/* callback */
+typedef void (*RegressTestSimpleCallback) (void);
+typedef int (*RegressTestCallback) (void);
+typedef int (*RegressTestCallbackUserData) (gpointer user_data);
+
+void regress_test_simple_callback (RegressTestSimpleCallback callback);
+int regress_test_callback (RegressTestCallback callback);
+int regress_test_multi_callback (RegressTestCallback callback);
+int regress_test_callback_user_data (RegressTestCallbackUserData callback,
+                             gpointer user_data);
+int regress_test_callback_destroy_notify (RegressTestCallbackUserData callback,
+                                  gpointer user_data,
+                                  GDestroyNotify notify);
+int regress_test_callback_thaw_notifications (void);
+
+void regress_test_callback_async (RegressTestCallbackUserData callback, gpointer user_data);
+int regress_test_callback_thaw_async (void);
+
+void regress_test_async_ready_callback (GAsyncReadyCallback callback);
+
+void regress_test_obj_instance_method_callback (RegressTestObj *obj, RegressTestCallback callback);
+void regress_test_obj_static_method_callback (RegressTestCallback callback);
+RegressTestObj *regress_test_obj_new_callback (RegressTestCallbackUserData callback,
+                                gpointer user_data,
+                                GDestroyNotify notify);
+
+/* interface */
+#define REGRESS_TEST_TYPE_INTERFACE              (regress_test_interface_get_type ())
+#define REGRESS_TEST_INTERFACE(object)           (G_TYPE_CHECK_INSTANCE_CAST ((object), REGRESS_TEST_TYPE_INTERFACE, RegressTestInterface))
+#define REGRESS_TEST_IS_INTERFACE(object)        (G_TYPE_CHECK_INSTANCE_TYPE ((object), REGRESS_TEST_TYPE_INTERFACE))
+#define REGRESS_TEST_INTERFACE_GET_IFACE(obj)    (G_TYPE_INSTANCE_GET_INTERFACE ((obj), REGRESS_TEST_TYPE_INTERFACE, RegressTestInterfaceIface))
+
+typedef struct _RegressTestInterfaceIface RegressTestInterfaceIface;
+
+struct _RegressTestInterfaceIface {
+    GTypeInterface base_iface;
+};
+
+GType regress_test_interface_get_type (void) G_GNUC_CONST;
+
+/* gobject with non-standard prefix */
+#define REGRESS_TEST_TYPE_WI_802_1X              (regress_test_wi_802_1x_get_type ())
+#define REGRESS_TEST_WI_802_1X(object)        (G_TYPE_CHECK_INSTANCE_CAST ((object), REGRESS_TEST_TYPE_WI_802_1X, RegressTestWi8021x))
+#define REGRESS_TEST_IS_WI_802_1X(object)     (G_TYPE_CHECK_INSTANCE_TYPE ((object), REGRESS_TEST_TYPE_WI_802_1X))
+#define REGRESS_TEST_WI_802_1X_GET_CLASS(obj)    (G_TYPE_INSTANCE_GET_CLASS ((obj), REGRESS_TEST_TYPE_WI_802_1X, RegressTestWi8021xClass))
+
+typedef struct
+{
+  GObject parent_instance;
+
+  gboolean testbool;
+} RegressTestWi8021x;
+
+typedef struct
+{
+  GObjectClass parent_class;
+} RegressTestWi8021xClass;
+
+GType        regress_test_wi_802_1x_get_type (void);
+RegressTestWi8021x* regress_test_wi_802_1x_new (void);
+gboolean     regress_test_wi_802_1x_get_testbool (RegressTestWi8021x *obj);
+void         regress_test_wi_802_1x_set_testbool (RegressTestWi8021x *obj, gboolean v);
+int          regress_test_wi_802_1x_static_method (int x);
+
+/* floating gobject */
+#define REGRESS_TEST_TYPE_FLOATING           (regress_test_floating_get_type ())
+#define REGRESS_TEST_FLOATING(object)        (G_TYPE_CHECK_INSTANCE_CAST ((object), REGRESS_TEST_TYPE_FLOATING, RegressTestFloating))
+#define REGRESS_TEST_IS_FLOATING(object)     (G_TYPE_CHECK_INSTANCE_TYPE ((object), REGRESS_TEST_TYPE_FLOATING))
+#define REGRESS_TEST_FLOATING_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), REGRESS_TEST_TYPE_FLOATING, RegressTestFloatingClass))
+
+typedef struct
+{
+  GInitiallyUnowned parent_instance;
+} RegressTestFloating;
+
+typedef struct
+{
+  GInitiallyUnownedClass parent_class;
+} RegressTestFloatingClass;
+
+GType        regress_test_floating_get_type (void);
+RegressTestFloating* regress_test_floating_new (void);
+
+/* Function signature torture tests */
+void regress_test_torture_signature_0 (int        x,
+                               double     *y,
+                               int        *z,
+                               const char *foo,
+                               int        *q,
+                               guint       m);
+gboolean regress_test_torture_signature_1 (int        x,
+                                   double     *y,
+                                   int        *z,
+                                   const char *foo,
+                                   int        *q,
+                                   guint       m,
+                                   GError    **error);
+void regress_test_torture_signature_2 (int                  x,
+				       RegressTestCallbackUserData  callback,
+				       gpointer              user_data,
+				       GDestroyNotify        notify,
+				       double               *y,
+				       int                  *z,
+				       const char           *foo,
+				       int                  *q,
+				       guint                 m);
+
+GValue *regress_test_date_in_gvalue (void);
+GValue *regress_test_strv_in_gvalue (void);
+
+#endif /* __GITESTTYPES_H__ */



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]