[gobject-introspection/wip/transformer: 7/9] Use GLib types consistently



commit 4f1c8f5e2009c051241862d1e0291ab56bd949f9
Author: Colin Walters <walters verbum org>
Date:   Wed Jul 21 21:06:17 2010 -0400

    Use GLib types consistently
    
    Rather than have the scanner/parser handle both e.g. "glong" and
    "long", simply use the GLib types everywhere.
    
    This commit adds TYPE_LONG_LONG and TYPE_LONG_DOUBLE to the
    scanner types; however, rather than add them to the typelib,
    they're just marked as not-introspectable.

 gir/gio-2.0.c                              |    2 +-
 gir/glib-2.0.c                             |    2 +-
 girepository/girepository.c                |   22 +-
 girepository/girnode.c                     |   28 +--
 girepository/girparser.c                   |   58 ++--
 giscanner/annotationparser.py              |    2 +-
 giscanner/ast.py                           |  154 +++++-----
 giscanner/girwriter.py                     |   36 ++--
 giscanner/glibast.py                       |   50 +---
 giscanner/glibtransformer.py               |   16 +-
 giscanner/transformer.py                   |   15 +-
 tests/scanner/Annotation-1.0-expected.gir  |  426 +++++++++++++-------------
 tests/scanner/Bar-1.0-expected.gir         |    4 +-
 tests/scanner/Foo-1.0-expected.gir         |  228 +++++++-------
 tests/scanner/Regress-1.0-expected.gir     |  446 ++++++++++++++--------------
 tests/scanner/TestInherit-1.0-expected.gir |   34 +-
 tests/scanner/Utility-1.0-expected.gir     |   38 ++--
 tests/scanner/annotation.c                 |    2 +-
 18 files changed, 756 insertions(+), 807 deletions(-)
---
diff --git a/gir/gio-2.0.c b/gir/gio-2.0.c
index 2ec02a3..71df3e8 100644
--- a/gir/gio-2.0.c
+++ b/gir/gio-2.0.c
@@ -83,7 +83,7 @@
 /**
  * g_file_enumerator_next_files_finish:
  *
- * Return value: (transfer full) (element-type FileInfo):
+ * Return value: (transfer full) (element-type GFileInfo):
  */
 
 /**
diff --git a/gir/glib-2.0.c b/gir/glib-2.0.c
index 6203121..6591c64 100644
--- a/gir/glib-2.0.c
+++ b/gir/glib-2.0.c
@@ -6,7 +6,7 @@
 
 /**
  * g_file_set_contents:
- * @contents: (array length=length) (element-type uint8):
+ * @contents: (array length=length) (element-type guint8):
  */
 
 /**
diff --git a/girepository/girepository.c b/girepository/girepository.c
index 17d076d..34b0b04 100644
--- a/girepository/girepository.c
+++ b/girepository/girepository.c
@@ -1431,27 +1431,27 @@ g_type_tag_to_string (GITypeTag type)
     case GI_TYPE_TAG_VOID:
       return "void";
     case GI_TYPE_TAG_BOOLEAN:
-      return "boolean";
+      return "gboolean";
     case GI_TYPE_TAG_INT8:
-      return "int8";
+      return "gint8";
     case GI_TYPE_TAG_UINT8:
-      return "uint8";
+      return "guint8";
     case GI_TYPE_TAG_INT16:
-      return "int16";
+      return "gint16";
     case GI_TYPE_TAG_UINT16:
-      return "uint16";
+      return "guint16";
     case GI_TYPE_TAG_INT32:
-      return "int32";
+      return "gint32";
     case GI_TYPE_TAG_UINT32:
-      return "uint32";
+      return "guint32";
     case GI_TYPE_TAG_INT64:
-      return "int64";
+      return "gint64";
     case GI_TYPE_TAG_UINT64:
-      return "uint64";
+      return "guint64";
     case GI_TYPE_TAG_FLOAT:
-      return "float";
+      return "gfloat";
     case GI_TYPE_TAG_DOUBLE:
-      return "double";
+      return "gdouble";
     case GI_TYPE_TAG_GTYPE:
       return "GType";
     case GI_TYPE_TAG_UTF8:
diff --git a/girepository/girnode.c b/girepository/girnode.c
index b35c745..2f6a270 100644
--- a/girepository/girnode.c
+++ b/girepository/girnode.c
@@ -1219,36 +1219,10 @@ serialize_type (GIrTypelibBuild    *build,
 		GString      *str)
 {
   gint i;
-  const gchar* basic[] = {
-    "void",
-    "boolean",
-    "int8",
-    "uint8",
-    "int16",
-    "uint16",
-    "int32",
-    "uint32",
-    "int64",
-    "uint64",
-    "short",
-    "ushort",
-    "int",
-    "uint",
-    "long",
-    "ulong",
-    "ssize",
-    "size",
-    "float",
-    "double",
-    "time_t",
-    "GType",
-    "utf8",
-    "filename",
-  };
 
   if (node->tag < GI_TYPE_TAG_ARRAY)
     {
-      g_string_append_printf (str, "%s%s", basic[node->tag],
+      g_string_append_printf (str, "%s%s", g_type_tag_to_string (node->tag),
 			      node->is_pointer ? "*" : "");
     }
   else if (node->tag == GI_TYPE_TAG_ARRAY)
diff --git a/girepository/girparser.c b/girepository/girparser.c
index 17ed6b5..570e648 100644
--- a/girepository/girparser.c
+++ b/girepository/girparser.c
@@ -359,13 +359,13 @@ typedef struct {
 } IntegerAliasInfo;
 
 static IntegerAliasInfo integer_aliases[] = {
-  { "char",     SIZEOF_CHAR,      0 },
-  { "short",    SIZEOF_SHORT,     1 },
-  { "ushort",   SIZEOF_SHORT,     0 },
-  { "int",      SIZEOF_INT,       1 },
-  { "uint",     SIZEOF_INT,       0 },
-  { "long",     SIZEOF_LONG,      1 },
-  { "ulong",    SIZEOF_LONG,      0 },
+  { "gchar",    SIZEOF_CHAR,      0 },
+  { "gshort",   SIZEOF_SHORT,     1 },
+  { "gushort",  SIZEOF_SHORT,     0 },
+  { "gint",     SIZEOF_INT,       1 },
+  { "guint",    SIZEOF_INT,       0 },
+  { "glong",    SIZEOF_LONG,      1 },
+  { "gulong",   SIZEOF_LONG,      0 },
   { "gsize",    GLIB_SIZEOF_SIZE_T,    0 },
   { "gssize",   GLIB_SIZEOF_SIZE_T,    1 },
 };
@@ -379,30 +379,30 @@ typedef struct {
 #define BASIC_TYPE_FIXED_OFFSET 3
 
 static BasicTypeInfo basic_types[] = {
-    { "none",     GI_TYPE_TAG_VOID,    0 },
-    { "any",      GI_TYPE_TAG_VOID,    1 },
-
-    { "bool",     GI_TYPE_TAG_BOOLEAN, 0 },
-    { "int8",     GI_TYPE_TAG_INT8,    0 }, /* Start of BASIC_TYPE_FIXED_OFFSET */
-    { "uint8",    GI_TYPE_TAG_UINT8,   0 },
-    { "int16",    GI_TYPE_TAG_INT16,   0 },
-    { "uint16",   GI_TYPE_TAG_UINT16,  0 },
-    { "int32",    GI_TYPE_TAG_INT32,   0 },
-    { "uint32",   GI_TYPE_TAG_UINT32,  0 },
-    { "int64",    GI_TYPE_TAG_INT64,   0 },
-    { "uint64",   GI_TYPE_TAG_UINT64,  0 },
-    { "float",    GI_TYPE_TAG_FLOAT,   0 },
-    { "double",   GI_TYPE_TAG_DOUBLE,  0 },
-    { "GType",    GI_TYPE_TAG_GTYPE,   0 },
-    { "utf8",     GI_TYPE_TAG_UTF8,    1 },
-    { "filename", GI_TYPE_TAG_FILENAME,1 },
+    { "none",      GI_TYPE_TAG_VOID,    0 },
+    { "gpointer",  GI_TYPE_TAG_VOID,    1 },
+
+    { "gboolean",  GI_TYPE_TAG_BOOLEAN, 0 },
+    { "gint8",     GI_TYPE_TAG_INT8,    0 }, /* Start of BASIC_TYPE_FIXED_OFFSET */
+    { "guint8",    GI_TYPE_TAG_UINT8,   0 },
+    { "gint16",    GI_TYPE_TAG_INT16,   0 },
+    { "guint16",   GI_TYPE_TAG_UINT16,  0 },
+    { "gint32",    GI_TYPE_TAG_INT32,   0 },
+    { "guint32",   GI_TYPE_TAG_UINT32,  0 },
+    { "gint64",    GI_TYPE_TAG_INT64,   0 },
+    { "guint64",   GI_TYPE_TAG_UINT64,  0 },
+    { "gfloat",    GI_TYPE_TAG_FLOAT,   0 },
+    { "gdouble",   GI_TYPE_TAG_DOUBLE,  0 },
+    { "GType",     GI_TYPE_TAG_GTYPE,   0 },
+    { "utf8",      GI_TYPE_TAG_UTF8,    1 },
+    { "filename",  GI_TYPE_TAG_FILENAME,1 },
 };
 
 static const BasicTypeInfo *
 parse_basic (const char *str)
 {
-  gint i;
-  gint n_basic = G_N_ELEMENTS (basic_types);
+  guint i;
+  guint n_basic = G_N_ELEMENTS (basic_types);
 
   for (i = 0; i < n_basic; i++)
     {
@@ -1981,14 +1981,14 @@ end_type_top (ParseContext *ctx)
       typenode->tag == GI_TYPE_TAG_GSLIST)
     {
       if (typenode->parameter_type1 == NULL)
-	typenode->parameter_type1 = parse_type (ctx, "any");
+	typenode->parameter_type1 = parse_type (ctx, "gpointer");
     }
   else if (typenode->tag == GI_TYPE_TAG_GHASH)
     {
       if (typenode->parameter_type1 == NULL)
 	{
-	  typenode->parameter_type1 = parse_type (ctx, "any");
-	  typenode->parameter_type2 = parse_type (ctx, "any");
+	  typenode->parameter_type1 = parse_type (ctx, "gpointer");
+	  typenode->parameter_type2 = parse_type (ctx, "gpointer");
 	}
     }
 
diff --git a/giscanner/annotationparser.py b/giscanner/annotationparser.py
index c642d56..9e4340f 100644
--- a/giscanner/annotationparser.py
+++ b/giscanner/annotationparser.py
@@ -783,7 +783,7 @@ class AnnotationApplier(object):
                 self._guess_direction(node) == PARAM_DIRECTION_IN and
                 element_type is None):
                 # FIXME: unsigned char/guchar should be uint8
-                container_type.element_type = Type('int8')
+                container_type.element_type = Type('gint8')
         container_type.size = array_values.get(OPT_ARRAY_FIXED_SIZE)
         return container_type
 
diff --git a/giscanner/ast.py b/giscanner/ast.py
index 3678e8c..8c7ea09 100644
--- a/giscanner/ast.py
+++ b/giscanner/ast.py
@@ -27,74 +27,58 @@ These can later on be extended (eg subclassed) with additional information
 which is language/library/domain specific.
 """
 
-##
-## Basic types, modeled on GITypeTag but not equivalent
-##
-
-TYPE_NONE = 'none' # We differ from repository on these first two
-TYPE_ANY = 'any'
-TYPE_BOOLEAN = 'boolean'
-TYPE_INT8 = 'int8'
-TYPE_UINT8 = 'uint8'
-TYPE_SHORT = 'short'
-TYPE_USHORT = 'ushort'
-TYPE_INT16 = 'int16'
-TYPE_UINT16 = 'uint16'
-TYPE_INT = 'int'
-TYPE_UINT = 'uint'
-TYPE_INT32 = 'int32'
-TYPE_UINT32 = 'uint32'
-TYPE_INT64 = 'int64'
-TYPE_UINT64 = 'uint64'
-TYPE_LONG = 'long'
-TYPE_ULONG = 'ulong'
-TYPE_SIZET = 'gsize'
-TYPE_SSIZET = 'gssize'
+######
+## Fundamental types
+######
+# Two special ones
+TYPE_NONE = 'none'
+TYPE_ANY = 'gpointer'
+# "Basic" types
+TYPE_BOOLEAN = 'gboolean'
+TYPE_INT8 = 'gint8'
+TYPE_UINT8 = 'guint8'
+TYPE_INT16 = 'gint16'
+TYPE_UINT16 = 'guint16'
+TYPE_INT32 = 'gint32'
+TYPE_UINT32 = 'guint32'
+TYPE_INT64 = 'gint64'
+TYPE_UINT64 = 'guint64'
+TYPE_CHAR = 'gchar'
+TYPE_SHORT = 'gshort'
+TYPE_USHORT = 'gushort'
+TYPE_INT = 'gint'
+TYPE_UINT = 'guint'
+TYPE_LONG = 'glong'
+TYPE_ULONG = 'gulong'
+# C99 types
+TYPE_LONG_LONG = 'long long'
+TYPE_LONG_ULONG = 'unsigned long long'
+TYPE_FLOAT = 'gfloat'
+TYPE_DOUBLE = 'gdouble'
+# ?
+TYPE_LONG_DOUBLE = 'long double'
+
+# C types with semantics overlaid
 TYPE_GTYPE = 'GType'
-TYPE_FLOAT = 'float'
-TYPE_DOUBLE = 'double'
-TYPE_STRING = 'utf8' # requires zero-terminated
+TYPE_STRING = 'utf8'
 TYPE_FILENAME = 'filename'
 
 BASIC_GIR_TYPES = [TYPE_BOOLEAN, TYPE_INT8, TYPE_UINT8, TYPE_INT16,
                    TYPE_UINT16, TYPE_INT32, TYPE_UINT32, TYPE_INT64,
-                   TYPE_UINT64, TYPE_SHORT, TYPE_USHORT, TYPE_INT,
-                   TYPE_UINT, TYPE_LONG, TYPE_ULONG, TYPE_SSIZET,
-                   TYPE_SIZET, TYPE_FLOAT, TYPE_DOUBLE,
-                   TYPE_GTYPE]
+                   TYPE_UINT64, TYPE_CHAR, TYPE_SHORT, TYPE_USHORT, TYPE_INT,
+                   TYPE_UINT, TYPE_LONG, TYPE_ULONG, TYPE_LONG_LONG,
+                   TYPE_LONG_ULONG, TYPE_FLOAT, TYPE_DOUBLE,
+                   TYPE_LONG_DOUBLE, TYPE_GTYPE]
 GIR_TYPES = [TYPE_NONE, TYPE_ANY]
 GIR_TYPES.extend(BASIC_GIR_TYPES)
 GIR_TYPES.extend([TYPE_STRING, TYPE_FILENAME])
 
-# Higher-level data types
-TYPE_SEQUENCE = 'sequence' # Sequence of something
-
-# Wide/Unicode
-TYPE_UCHAR = 'uchar'
-TYPE_USTRING = 'ustring'
-
-##
-## Parameters
-##
-
-PARAM_DIRECTION_IN = 'in'
-PARAM_DIRECTION_OUT = 'out'
-PARAM_DIRECTION_INOUT = 'inout'
-
-PARAM_SCOPE_CALL = 'call'
-PARAM_SCOPE_ASYNC = 'async'
-PARAM_SCOPE_NOTIFIED = 'notified'
-
-PARAM_TRANSFER_NONE = 'none'
-PARAM_TRANSFER_CONTAINER = 'container'
-PARAM_TRANSFER_FULL = 'full'
-
 type_names = {}
-for name in GIR_TYPES:
-    type_names[name] = name
+for typeval in GIR_TYPES:
+    type_names[typeval] = typeval
 
 # C builtin
-type_names['char'] = TYPE_INT8
+type_names['char'] = TYPE_CHAR
 type_names['signed char'] = TYPE_INT8
 type_names['unsigned char'] = TYPE_UINT8
 type_names['short'] = TYPE_SHORT
@@ -115,8 +99,25 @@ type_names['double'] = TYPE_DOUBLE
 type_names['char*'] = TYPE_STRING
 type_names['void*'] = TYPE_ANY
 type_names['void'] = TYPE_NONE
+# Also alias the signed one here
+type_names['signed long long'] = TYPE_LONG_LONG
 
-# Random C unix type definitions; note some of these may be GNU Libc
+# A few additional GLib type aliases
+type_names['guchar'] = TYPE_UINT8
+type_names['gchararray'] = TYPE_STRING
+type_names['gchar*'] = TYPE_STRING
+type_names['gsize'] = TYPE_ULONG
+type_names['gssize'] = TYPE_LONG
+type_names['gconstpointer'] = TYPE_ANY
+
+# Some special C types that aren't scriptable, and we just squash
+type_names['va_list'] = TYPE_ANY
+
+# C stdio, used in GLib public headers; squash this for now here
+# until we move scanning into GLib and can (skip)
+type_names['FILE*'] = TYPE_ANY
+
+# One off C unix type definitions; note some of these may be GNU Libc
 # specific.  If someone is actually bitten by this, feel free to do
 # the required configure goop to determine their size and replace
 # here.
@@ -127,39 +128,48 @@ type_names['void'] = TYPE_NONE
 # methods are added under #ifdefs inside GLib itself.  We could just (skip)
 # the relevant methods, but on the other hand, since these types are just
 # integers it's easy enough to expand them.
-type_names['size_t'] = TYPE_SIZET
+type_names['size_t'] = type_names['gsize']
 type_names['time_t'] = TYPE_LONG
-type_names['off_t'] = TYPE_SIZET
+type_names['off_t'] = type_names['gsize']
 type_names['pid_t'] = TYPE_INT
 type_names['uid_t'] = TYPE_UINT
 type_names['gid_t'] = TYPE_UINT
 type_names['dev_t'] = TYPE_INT
 type_names['socklen_t'] = TYPE_INT32
+type_names['size_t'] = TYPE_ULONG
+type_names['ssize_t'] = TYPE_LONG
 
 # Obj-C
 type_names['id'] = TYPE_ANY
 
-# Suppress some GLib names
-type_names['uchar'] = TYPE_UINT8
-type_names['ushort'] = TYPE_USHORT
-type_names['size'] = TYPE_SIZET
-type_names['ssize'] = TYPE_SSIZET
-type_names['pointer'] = TYPE_ANY
-type_names['constpointer'] = TYPE_ANY
-
-
 # These types, when seen by reference, are converted into an Array()
 # by default
-# If you add/change these, be sure to update glibast.py too
 default_array_types = {}
-default_array_types['uint8*'] = TYPE_UINT8
+default_array_types['guint8*'] = TYPE_UINT8
+default_array_types['guchar*'] = TYPE_UINT8
 default_array_types['utf8*'] = TYPE_STRING
+default_array_types['char**'] = TYPE_STRING
+default_array_types['gchar**'] = TYPE_STRING
 
 # These types, when seen by reference, are interpreted as out parameters
 default_out_types = (TYPE_SHORT, TYPE_USHORT, TYPE_INT, TYPE_UINT,
-                     TYPE_LONG, TYPE_ULONG, TYPE_FLOAT, TYPE_DOUBLE,
-                     TYPE_SIZET, TYPE_SSIZET)
+                     TYPE_LONG, TYPE_ULONG, TYPE_FLOAT, TYPE_DOUBLE)
+
+##
+## Parameters
+##
+
+PARAM_DIRECTION_IN = 'in'
+PARAM_DIRECTION_OUT = 'out'
+PARAM_DIRECTION_INOUT = 'inout'
+
+PARAM_SCOPE_CALL = 'call'
+PARAM_SCOPE_ASYNC = 'async'
+PARAM_SCOPE_NOTIFIED = 'notified'
 
+PARAM_TRANSFER_NONE = 'none'
+PARAM_TRANSFER_CONTAINER = 'container'
+PARAM_TRANSFER_FULL = 'full'
 
 def type_name_from_ctype(ctype):
     return type_names.get(ctype, ctype)
diff --git a/giscanner/girwriter.py b/giscanner/girwriter.py
index 0f62125..c810349 100644
--- a/giscanner/girwriter.py
+++ b/giscanner/girwriter.py
@@ -23,7 +23,7 @@ from __future__ import with_statement
 
 from .ast import (Alias, Array, Bitfield, Callback, Class, Constant, Enum,
                   Function, Interface, List, Map, Member, Struct, Union,
-                  Varargs, Type)
+                  Varargs, Type, TYPE_ANY)
 from .glibast import (GLibBoxed, GLibEnum, GLibEnumMember,
                       GLibFlags, GLibObject, GLibInterface,
                       GLibRecord)
@@ -258,7 +258,7 @@ and/or use gtk-doc annotations. ''')
                 if ntype.element_type is not None:
                     self._write_type(ntype.element_type)
                 else:
-                    self._write_type(Type('any', ctype='gpointer'))
+                    self._write_type(Type(TYPE_ANY, ctype='gpointer'))
             return
         attrs = [('name', self._type_to_string(ntype))]
         # FIXME: figure out if type references a basic type
@@ -273,7 +273,7 @@ and/or use gtk-doc annotations. ''')
                 if isinstance(ntype, List) and ntype.element_type:
                     self._write_type(ntype.element_type)
                 else:
-                    self._write_type(Type('any', ctype='gpointer'))
+                    self._write_type(Type(TYPE_ANY, ctype='gpointer'))
             return
         if isinstance(ntype, Map) and ntype.key_type:
             with self.tagcontext('type', attrs):
@@ -363,25 +363,25 @@ and/or use gtk-doc annotations. ''')
         with self.tagcontext(tag_name, attrs):
             self._write_generic(node)
             if isinstance(node, GLibObject):
-                for iface in node.interfaces:
+                for iface in sorted(node.interfaces):
                     self.write_tag('implements', [('name', iface)])
             if isinstance(node, Interface):
-                for iface in node.prerequisites:
+                for iface in sorted(node.prerequisites):
                     self.write_tag('prerequisite', [('name', iface)])
             if isinstance(node, Class):
-                for method in node.constructors:
+                for method in sorted(node.constructors):
                     self._write_constructor(method)
-                for method in node.static_methods:
+                for method in sorted(node.static_methods):
                     self._write_static_method(method)
-            for vfunc in node.virtual_methods:
+            for vfunc in sorted(node.virtual_methods):
                 self._write_vfunc(vfunc)
-            for method in node.methods:
+            for method in sorted(node.methods):
                 self._write_method(method)
-            for prop in node.properties:
+            for prop in sorted(node.properties):
                 self._write_property(prop)
             for field in node.fields:
                 self._write_field(field)
-            for signal in node.signals:
+            for signal in sorted(node.signals):
                 self._write_signal(signal)
 
     def _write_boxed(self, boxed):
@@ -390,9 +390,9 @@ and/or use gtk-doc annotations. ''')
         attrs.extend(self._boxed_attrs(boxed))
         with self.tagcontext('glib:boxed', attrs):
             self._write_generic(boxed)
-            for method in boxed.constructors:
+            for method in sorted(boxed.constructors):
                 self._write_constructor(method)
-            for method in boxed.methods:
+            for method in sorted(boxed.methods):
                 self._write_method(method)
 
     def _write_property(self, prop):
@@ -452,9 +452,9 @@ and/or use gtk-doc annotations. ''')
             if record.fields:
                 for field in record.fields:
                     self._write_field(field, is_gtype_struct)
-            for method in record.constructors:
+            for method in sorted(record.constructors):
                 self._write_constructor(method)
-            for method in record.methods:
+            for method in sorted(record.methods):
                 self._write_method(method)
 
     def _write_union(self, union):
@@ -472,9 +472,9 @@ and/or use gtk-doc annotations. ''')
             if union.fields:
                 for field in union.fields:
                     self._write_field(field)
-            for method in union.constructors:
+            for method in sorted(union.constructors):
                 self._write_constructor(method)
-            for method in union.methods:
+            for method in sorted(union.methods):
                 self._write_method(method)
 
     def _write_field(self, field, is_gtype_struct=False):
@@ -489,7 +489,7 @@ and/or use gtk-doc annotations. ''')
                 if is_gtype_struct:
                     self._write_callback(field)
                 else:
-                    attrs = [('name', 'any'), ('c:type', 'pointer')]
+                    attrs = [('name', TYPE_ANY), ('c:type', 'pointer')]
                     self.write_tag('type', attrs)
         elif isinstance(field, Struct):
             self._write_record(field)
diff --git a/giscanner/glibast.py b/giscanner/glibast.py
index c712988..ad87926 100644
--- a/giscanner/glibast.py
+++ b/giscanner/glibast.py
@@ -19,48 +19,7 @@
 #
 
 from .ast import (Bitfield, Class, Enum, Interface, Member, Node,
-                  Property, Struct, Union, Record)
-from .ast import (
-    type_names, default_array_types,
-    TYPE_STRING, TYPE_INT8, TYPE_UINT8, TYPE_SHORT, TYPE_USHORT,
-    TYPE_INT16, TYPE_UINT16, TYPE_INT, TYPE_UINT, TYPE_UINT32,
-    TYPE_INT32, TYPE_LONG, TYPE_ULONG, TYPE_INT64, TYPE_UINT64,
-    TYPE_FLOAT, TYPE_DOUBLE, TYPE_BOOLEAN, TYPE_ANY, TYPE_SSIZET,
-    TYPE_SIZET)
-
-
-# Glib type names
-type_names['gchararray'] = TYPE_STRING
-type_names['gint8'] = TYPE_INT8
-type_names['guint8'] = TYPE_UINT8
-type_names['gint16'] = TYPE_INT16
-type_names['guint16'] = TYPE_UINT16
-type_names['gint'] = TYPE_INT
-type_names['guint'] = TYPE_UINT
-type_names['gint32'] = TYPE_INT32
-type_names['guint32'] = TYPE_UINT32
-type_names['glong'] = TYPE_LONG
-type_names['gulong'] = TYPE_ULONG
-type_names['gint64'] = TYPE_INT64
-type_names['guint64'] = TYPE_UINT64
-type_names['gfloat'] = TYPE_FLOAT
-type_names['gdouble'] = TYPE_DOUBLE
-type_names['gchar*'] = TYPE_STRING
-type_names['gboolean'] = TYPE_BOOLEAN
-type_names['gpointer'] = TYPE_ANY
-type_names['gconstpointer'] = TYPE_ANY
-type_names['gsize'] = TYPE_SIZET
-type_names['gssize'] = TYPE_SSIZET
-type_names['gchar'] = TYPE_INT8
-type_names['guchar'] = TYPE_UINT8
-type_names['gshort'] = TYPE_SHORT
-type_names['gushort'] = TYPE_USHORT
-
-# It's not very nice to duplicate the array types from ast.py,
-# but a clean fix is hard without essentially hardcoding
-# char * again inside transformer.py
-default_array_types['guint8*'] = TYPE_UINT8
-default_array_types['gchar**'] = TYPE_STRING
+                  Property, Union, Record)
 
 class GLibRecord(Record):
     def __init__(self, *args, **kwargs):
@@ -136,10 +95,12 @@ class GLibBoxed:
         self.get_type = get_type
 
 
-class GLibBoxedStruct(Struct, GLibBoxed):
+
+
+class GLibBoxedStruct(Record, GLibBoxed):
 
     def __init__(self, name, type_name, get_type, ctype=None):
-        Struct.__init__(self, name, ctype or type_name)
+        Record.__init__(self, name, ctype or type_name)
         GLibBoxed.__init__(self, type_name, get_type)
 
 
@@ -160,6 +121,7 @@ class GLibBoxedOther(Node, GLibBoxed):
         self.ctype = type_name
         self.doc = None
 
+
 class GLibInterface(Interface):
 
     def __init__(self, name, parent, type_name, get_type,
diff --git a/giscanner/glibtransformer.py b/giscanner/glibtransformer.py
index 391042d..6aae64b 100644
--- a/giscanner/glibtransformer.py
+++ b/giscanner/glibtransformer.py
@@ -30,12 +30,12 @@ from .ast import (Alias, Bitfield, Callable, Callback, Class, Constant, Enum,
                   Property, Record, Return, Type, TypeContainer, Union,
                   Field, VFunction, type_name_from_ctype, default_array_types,
                   TYPE_UINT8, PARAM_TRANSFER_FULL, Array, List,
-                  Map, Varargs)
+                  TYPE_LONG_LONG, TYPE_LONG_DOUBLE,
+                  Map, Varargs, type_names)
 from .transformer import Names
 from .glibast import (GLibBoxed, GLibEnum, GLibEnumMember, GLibFlags,
                       GLibInterface, GLibObject, GLibSignal, GLibBoxedStruct,
-                      GLibBoxedUnion, GLibBoxedOther, GLibRecord,
-                      type_names)
+                      GLibBoxedUnion, GLibBoxedOther, GLibRecord)
 from .utils import to_underscores, to_underscores_noprefix
 
 default_array_types['guchar*'] = TYPE_UINT8
@@ -772,7 +772,7 @@ class GLibTransformer(object):
         for interface in xmlnode.findall('implements'):
             gitype = self._resolve_gtypename(interface.attrib['name'])
             gt_interfaces.append(gitype)
-        node.interfaces = sorted(gt_interfaces)
+        node.interfaces = gt_interfaces
 
     def _introspect_properties(self, node, xmlnode):
         for pspec in xmlnode.findall('property'):
@@ -788,7 +788,7 @@ class GLibTransformer(object):
                 readable, writable, construct, construct_only,
                 ctype,
                 ))
-        node.properties = sorted(node.properties)
+        node.properties = node.properties
 
     def _introspect_signals(self, node, xmlnode):
         for signal_info in xmlnode.findall('signal'):
@@ -808,7 +808,7 @@ class GLibTransformer(object):
                 param.transfer = 'none'
                 signal.parameters.append(param)
             node.signals.append(signal)
-        node.signals = sorted(node.signals)
+        node.signals = node.signals
 
     def _introspect_fundamental(self, xmlnode):
         # We only care about types that can be instantiatable, other
@@ -1160,7 +1160,9 @@ class GLibTransformer(object):
     def _introspectable_analysis(self, node, stack):
         if isinstance(node, TypeContainer):
             parent = stack[-1]
-            if isinstance(node.type, Varargs):
+            if node.type.name in (TYPE_LONG_LONG, TYPE_LONG_DOUBLE):
+                parent.introspectable = False
+            elif isinstance(node.type, Varargs):
                 parent.introspectable = False
             elif self._is_unannotated_list(node):
                 if isinstance(node, Parameter):
diff --git a/giscanner/transformer.py b/giscanner/transformer.py
index 2f25521..e2a2204 100644
--- a/giscanner/transformer.py
+++ b/giscanner/transformer.py
@@ -25,7 +25,8 @@ from .ast import (Bitfield, Callback, Enum, Function, Namespace, Member,
                   Parameter, Return, Struct, Field,
                   Type, Array, Alias, Interface, Class, Node, Union,
                   Varargs, Constant, type_name_from_ctype,
-                  type_names, TYPE_STRING, BASIC_GIR_TYPES)
+                  type_names, TYPE_ANY, TYPE_STRING,
+                  BASIC_GIR_TYPES)
 from .config import DATADIR, GIR_DIR, GIR_SUFFIX
 from .glibast import GLibBoxed
 from .girparser import GIRParser
@@ -345,7 +346,7 @@ context will be used."""
         return False
 
     def _handle_closure(self, param, closure_idx, closure_param):
-        if (closure_param.type.name == 'any' and
+        if (closure_param.type.name == TYPE_ANY and
             closure_param.name.endswith('data')):
             param.closure_name = closure_param.name
             param.closure_index = closure_idx
@@ -412,7 +413,7 @@ context will be used."""
         elif source_type.type == CTYPE_POINTER:
             value = self._create_source_type(source_type.base_type) + '*'
         else:
-            value = 'any'
+            value = TYPE_ANY
         return value
 
     def _create_parameters(self, base_type):
@@ -527,7 +528,7 @@ context will be used."""
         # Preserve "pointerness" of struct/union members
         if (is_member and canonical.endswith('*') and
             derefed_typename in BASIC_GIR_TYPES):
-            return 'any'
+            return TYPE_ANY
         else:
             return derefed_typename
 
@@ -584,10 +585,10 @@ context will be used."""
             type_name = 'utf8'
             value = symbol.const_string
         elif symbol.const_int is not None:
-            type_name = 'int'
+            type_name = 'gint'
             value = symbol.const_int
         elif symbol.const_double is not None:
-            type_name = 'double'
+            type_name = 'gdouble'
             value = symbol.const_double
         else:
             raise AssertionError()
@@ -658,7 +659,7 @@ context will be used."""
 
         # Mark the 'user_data' arguments
         for i, param in enumerate(parameters):
-            if (param.type.name == 'any' and
+            if (param.type.name == TYPE_ANY and
                 param.name == 'user_data'):
                 param.closure_index = i
 
diff --git a/tests/scanner/Annotation-1.0-expected.gir b/tests/scanner/Annotation-1.0-expected.gir
index 9401ca2..39c9b1d 100644
--- a/tests/scanner/Annotation-1.0-expected.gir
+++ b/tests/scanner/Annotation-1.0-expected.gir
@@ -18,12 +18,12 @@ and/or use gtk-doc annotations.  -->
       <doc xml:whitespace="preserve">This is a callback.</doc>
       <return-value transfer-ownership="none">
         <doc xml:whitespace="preserve">array of ints</doc>
-        <type name="int" c:type="gint*"/>
+        <type name="gint" c:type="gint*"/>
       </return-value>
       <parameters>
         <parameter name="in" transfer-ownership="none">
           <doc xml:whitespace="preserve">array of ints</doc>
-          <type name="int" c:type="gint*"/>
+          <type name="gint" c:type="gint*"/>
         </parameter>
       </parameters>
     </callback>
@@ -39,7 +39,7 @@ and/or use gtk-doc annotations.  -->
           <type name="utf8" c:type="char*"/>
         </parameter>
         <parameter name="user_data" transfer-ownership="none" closure="2">
-          <type name="any" c:type="gpointer"/>
+          <type name="gpointer" c:type="gpointer"/>
         </parameter>
       </parameters>
     </callback>
@@ -69,7 +69,7 @@ and/or use gtk-doc annotations.  -->
       <parameters>
         <parameter name="data" transfer-ownership="none" closure="0">
           <doc xml:whitespace="preserve">The user data</doc>
-          <type name="any" c:type="gpointer"/>
+          <type name="gpointer" c:type="gpointer"/>
         </parameter>
       </parameters>
     </callback>
@@ -81,36 +81,6 @@ and/or use gtk-doc annotations.  -->
            glib:type-struct="ObjectClass">
       <attribute name="org.example.Test" value="cows"/>
       <doc xml:whitespace="preserve">This is an object used to test annotations.</doc>
-      <method name="method" c:identifier="annotation_object_method">
-        <return-value transfer-ownership="none">
-          <doc xml:whitespace="preserve">an int</doc>
-          <type name="int" c:type="gint"/>
-        </return-value>
-      </method>
-      <method name="out" c:identifier="annotation_object_out">
-        <doc xml:whitespace="preserve">This is a test for out arguments</doc>
-        <return-value transfer-ownership="none">
-          <doc xml:whitespace="preserve">an int</doc>
-          <type name="int" c:type="gint"/>
-        </return-value>
-        <parameters>
-          <parameter name="outarg"
-                     direction="out"
-                     caller-allocates="0"
-                     transfer-ownership="full">
-            <doc xml:whitespace="preserve">This is an argument test</doc>
-            <type name="int" c:type="int*"/>
-          </parameter>
-        </parameters>
-      </method>
-      <method name="create_object"
-              c:identifier="annotation_object_create_object">
-        <doc xml:whitespace="preserve">Test returning a caller-owned object</doc>
-        <return-value transfer-ownership="full">
-          <doc xml:whitespace="preserve">The object</doc>
-          <type name="GObject.Object" c:type="GObject*"/>
-        </return-value>
-      </method>
       <method name="allow_none" c:identifier="annotation_object_allow_none">
         <return-value transfer-ownership="full">
           <type name="GObject.Object" c:type="GObject*"/>
@@ -121,79 +91,11 @@ and/or use gtk-doc annotations.  -->
           </parameter>
         </parameters>
       </method>
-      <method name="notrans" c:identifier="annotation_object_notrans">
-        <return-value transfer-ownership="none">
-          <doc xml:whitespace="preserve">An object, not referenced</doc>
-          <type name="GObject.Object" c:type="GObject*"/>
-        </return-value>
-      </method>
-      <method name="inout" c:identifier="annotation_object_inout">
-        <doc xml:whitespace="preserve">This is a test for out arguments</doc>
-        <return-value transfer-ownership="none">
-          <doc xml:whitespace="preserve">an int</doc>
-          <type name="int" c:type="gint"/>
-        </return-value>
-        <parameters>
-          <parameter name="inoutarg"
-                     direction="inout"
-                     caller-allocates="0"
-                     transfer-ownership="full">
-            <doc xml:whitespace="preserve">This is an argument test</doc>
-            <type name="int" c:type="int*"/>
-          </parameter>
-        </parameters>
-      </method>
-      <method name="inout2" c:identifier="annotation_object_inout2">
-        <doc xml:whitespace="preserve">This is a second test for out arguments</doc>
-        <return-value transfer-ownership="none">
-          <doc xml:whitespace="preserve">an int</doc>
-          <type name="int" c:type="gint"/>
-        </return-value>
-        <parameters>
-          <parameter name="inoutarg"
-                     direction="inout"
-                     caller-allocates="0"
-                     transfer-ownership="full">
-            <doc xml:whitespace="preserve">This is an argument test</doc>
-            <type name="int" c:type="int*"/>
-          </parameter>
-        </parameters>
-      </method>
-      <method name="inout3" c:identifier="annotation_object_inout3">
-        <doc xml:whitespace="preserve">This is a 3th test for out arguments</doc>
-        <return-value transfer-ownership="none">
-          <doc xml:whitespace="preserve">an int</doc>
-          <type name="int" c:type="gint"/>
-        </return-value>
-        <parameters>
-          <parameter name="inoutarg"
-                     direction="inout"
-                     caller-allocates="0"
-                     transfer-ownership="full"
-                     allow-none="1">
-            <doc xml:whitespace="preserve">This is an argument test</doc>
-            <type name="int" c:type="int*"/>
-          </parameter>
-        </parameters>
-      </method>
-      <method name="in" c:identifier="annotation_object_in">
-        <doc xml:whitespace="preserve">This is a test for in arguments</doc>
-        <return-value transfer-ownership="none">
-          <doc xml:whitespace="preserve">an int</doc>
-          <type name="int" c:type="gint"/>
-        </return-value>
-        <parameters>
-          <parameter name="inarg" transfer-ownership="none">
-            <doc xml:whitespace="preserve">This is an argument test</doc>
-            <type name="int" c:type="int*"/>
-          </parameter>
-        </parameters>
-      </method>
       <method name="calleeowns" c:identifier="annotation_object_calleeowns">
         <doc xml:whitespace="preserve">This is a test for out arguments; GObject defaults to transfer</doc>
         <return-value transfer-ownership="none">
           <doc xml:whitespace="preserve">an int</doc>
-          <type name="int" c:type="gint"/>
+          <type name="gint" c:type="gint"/>
         </return-value>
         <parameters>
           <parameter name="toown"
@@ -209,7 +111,7 @@ and/or use gtk-doc annotations.  -->
         <doc xml:whitespace="preserve">This is a test for out arguments, one transferred, other not</doc>
         <return-value transfer-ownership="none">
           <doc xml:whitespace="preserve">an int</doc>
-          <type name="int" c:type="gint"/>
+          <type name="gint" c:type="gint"/>
         </return-value>
         <parameters>
           <parameter name="toown1"
@@ -228,60 +130,6 @@ and/or use gtk-doc annotations.  -->
           </parameter>
         </parameters>
       </method>
-      <method name="get_strings" c:identifier="annotation_object_get_strings">
-        <doc xml:whitespace="preserve">This is a test for returning a list of strings, where
-each string needs to be freed.</doc>
-        <return-value transfer-ownership="full">
-          <doc xml:whitespace="preserve">list of strings</doc>
-          <type name="GLib.List" c:type="GList*">
-            <type name="utf8"/>
-          </type>
-        </return-value>
-      </method>
-      <method name="get_hash" c:identifier="annotation_object_get_hash">
-        <doc xml:whitespace="preserve">This is a test for returning a hash table mapping strings to
-objects.</doc>
-        <return-value transfer-ownership="full">
-          <doc xml:whitespace="preserve">hash table</doc>
-          <type name="GLib.HashTable" c:type="GHashTable*">
-            <type name="utf8"/>
-            <type name="GObject.Object"/>
-          </type>
-        </return-value>
-      </method>
-      <method name="with_voidp" c:identifier="annotation_object_with_voidp">
-        <return-value transfer-ownership="none">
-          <type name="none" c:type="void"/>
-        </return-value>
-        <parameters>
-          <parameter name="data" transfer-ownership="none">
-            <type name="any" c:type="void*"/>
-          </parameter>
-        </parameters>
-      </method>
-      <method name="get_objects" c:identifier="annotation_object_get_objects">
-        <doc xml:whitespace="preserve">This is a test for returning a list of objects.
-The list itself should be freed, but not the internal objects,
-intentionally similar example to gtk_container_get_children</doc>
-        <return-value transfer-ownership="container">
-          <doc xml:whitespace="preserve">list of objects</doc>
-          <type name="GLib.SList" c:type="GSList*">
-            <type name="Object"/>
-          </type>
-        </return-value>
-      </method>
-      <method name="use_buffer" c:identifier="annotation_object_use_buffer">
-        <return-value transfer-ownership="none">
-          <type name="none" c:type="void"/>
-        </return-value>
-        <parameters>
-          <parameter name="bytes" transfer-ownership="none">
-            <array c:type="guchar*">
-              <type name="uint8"/>
-            </array>
-          </parameter>
-        </parameters>
-      </method>
       <method name="compute_sum" c:identifier="annotation_object_compute_sum">
         <doc xml:whitespace="preserve">Test taking a zero-terminated array</doc>
         <return-value transfer-ownership="none">
@@ -291,7 +139,7 @@ intentionally similar example to gtk_container_get_children</doc>
           <parameter name="nums" transfer-ownership="none">
             <doc xml:whitespace="preserve">Sequence of numbers</doc>
             <array c:type="int*">
-              <type name="int"/>
+              <type name="gint"/>
             </array>
           </parameter>
         </parameters>
@@ -306,12 +154,12 @@ intentionally similar example to gtk_container_get_children</doc>
           <parameter name="nums" transfer-ownership="none">
             <doc xml:whitespace="preserve">Sequence of numbers that are zero-terminated</doc>
             <array zero-terminated="0" length="2" c:type="int*">
-              <type name="int"/>
+              <type name="gint"/>
             </array>
           </parameter>
           <parameter name="n_nums" transfer-ownership="none">
             <doc xml:whitespace="preserve">Length of number array</doc>
-            <type name="int" c:type="int"/>
+            <type name="gint" c:type="int"/>
           </parameter>
         </parameters>
       </method>
@@ -325,71 +173,199 @@ intentionally similar example to gtk_container_get_children</doc>
           <parameter name="nums" transfer-ownership="none">
             <doc xml:whitespace="preserve">Sequence of numbers that are zero-terminated</doc>
             <array length="2" c:type="int*">
-              <type name="int"/>
+              <type name="gint"/>
             </array>
           </parameter>
           <parameter name="n_nums" transfer-ownership="none">
             <doc xml:whitespace="preserve">Length of number array</doc>
-            <type name="int" c:type="int"/>
+            <type name="gint" c:type="int"/>
           </parameter>
         </parameters>
       </method>
-      <method name="parse_args" c:identifier="annotation_object_parse_args">
-        <doc xml:whitespace="preserve">Test taking a zero-terminated array with length parameter</doc>
+      <method name="create_object"
+              c:identifier="annotation_object_create_object">
+        <doc xml:whitespace="preserve">Test returning a caller-owned object</doc>
+        <return-value transfer-ownership="full">
+          <doc xml:whitespace="preserve">The object</doc>
+          <type name="GObject.Object" c:type="GObject*"/>
+        </return-value>
+      </method>
+      <method name="do_not_use"
+              c:identifier="annotation_object_do_not_use"
+              deprecated="Use annotation_object_create_object() instead."
+              deprecated-version="0.12">
+        <return-value transfer-ownership="full">
+          <type name="GObject.Object" c:type="GObject*"/>
+        </return-value>
+      </method>
+      <method name="extra_annos" c:identifier="annotation_object_extra_annos">
+        <attribute name="org.foobar" value="testvalue"/>
+        <return-value transfer-ownership="none">
+          <type name="none" c:type="void"/>
+        </return-value>
+      </method>
+      <method name="foreach" c:identifier="annotation_object_foreach">
+        <doc xml:whitespace="preserve">Test taking a call-scoped callback</doc>
         <return-value transfer-ownership="none">
           <type name="none" c:type="void"/>
         </return-value>
         <parameters>
-          <parameter name="argc"
+          <parameter name="func"
+                     transfer-ownership="none"
+                     scope="call"
+                     closure="2">
+            <doc xml:whitespace="preserve">Callback to invoke</doc>
+            <type name="ForeachFunc" c:type="AnnotationForeachFunc"/>
+          </parameter>
+          <parameter name="user_data" transfer-ownership="none">
+            <doc xml:whitespace="preserve">Callback user data</doc>
+            <type name="gpointer" c:type="gpointer"/>
+          </parameter>
+        </parameters>
+      </method>
+      <method name="get_hash" c:identifier="annotation_object_get_hash">
+        <doc xml:whitespace="preserve">This is a test for returning a hash table mapping strings to
+objects.</doc>
+        <return-value transfer-ownership="full">
+          <doc xml:whitespace="preserve">hash table</doc>
+          <type name="GLib.HashTable" c:type="GHashTable*">
+            <type name="utf8"/>
+            <type name="GObject.Object"/>
+          </type>
+        </return-value>
+      </method>
+      <method name="get_objects" c:identifier="annotation_object_get_objects">
+        <doc xml:whitespace="preserve">This is a test for returning a list of objects.
+The list itself should be freed, but not the internal objects,
+intentionally similar example to gtk_container_get_children</doc>
+        <return-value transfer-ownership="container">
+          <doc xml:whitespace="preserve">list of objects</doc>
+          <type name="GLib.SList" c:type="GSList*">
+            <type name="Object"/>
+          </type>
+        </return-value>
+      </method>
+      <method name="get_strings" c:identifier="annotation_object_get_strings">
+        <doc xml:whitespace="preserve">This is a test for returning a list of strings, where
+each string needs to be freed.</doc>
+        <return-value transfer-ownership="full">
+          <doc xml:whitespace="preserve">list of strings</doc>
+          <type name="GLib.List" c:type="GList*">
+            <type name="utf8"/>
+          </type>
+        </return-value>
+      </method>
+      <method name="in" c:identifier="annotation_object_in">
+        <doc xml:whitespace="preserve">This is a test for in arguments</doc>
+        <return-value transfer-ownership="none">
+          <doc xml:whitespace="preserve">an int</doc>
+          <type name="gint" c:type="gint"/>
+        </return-value>
+        <parameters>
+          <parameter name="inarg" transfer-ownership="none">
+            <doc xml:whitespace="preserve">This is an argument test</doc>
+            <type name="gint" c:type="int*"/>
+          </parameter>
+        </parameters>
+      </method>
+      <method name="inout" c:identifier="annotation_object_inout">
+        <doc xml:whitespace="preserve">This is a test for out arguments</doc>
+        <return-value transfer-ownership="none">
+          <doc xml:whitespace="preserve">an int</doc>
+          <type name="gint" c:type="gint"/>
+        </return-value>
+        <parameters>
+          <parameter name="inoutarg"
                      direction="inout"
                      caller-allocates="0"
                      transfer-ownership="full">
-            <doc xml:whitespace="preserve">Length of the argument vector</doc>
-            <type name="int" c:type="int*"/>
+            <doc xml:whitespace="preserve">This is an argument test</doc>
+            <type name="gint" c:type="int*"/>
           </parameter>
-          <parameter name="argv"
+        </parameters>
+      </method>
+      <method name="inout2" c:identifier="annotation_object_inout2">
+        <doc xml:whitespace="preserve">This is a second test for out arguments</doc>
+        <return-value transfer-ownership="none">
+          <doc xml:whitespace="preserve">an int</doc>
+          <type name="gint" c:type="gint"/>
+        </return-value>
+        <parameters>
+          <parameter name="inoutarg"
                      direction="inout"
                      caller-allocates="0"
                      transfer-ownership="full">
-            <doc xml:whitespace="preserve">Argument vector</doc>
-            <array length="1" c:type="char***">
-              <type name="utf8"/>
-            </array>
+            <doc xml:whitespace="preserve">This is an argument test</doc>
+            <type name="gint" c:type="int*"/>
           </parameter>
         </parameters>
       </method>
-      <method name="string_out" c:identifier="annotation_object_string_out">
-        <doc xml:whitespace="preserve">Test returning a string as an out parameter</doc>
+      <method name="inout3" c:identifier="annotation_object_inout3">
+        <doc xml:whitespace="preserve">This is a 3th test for out arguments</doc>
         <return-value transfer-ownership="none">
-          <doc xml:whitespace="preserve">some boolean</doc>
-          <type name="boolean" c:type="gboolean"/>
+          <doc xml:whitespace="preserve">an int</doc>
+          <type name="gint" c:type="gint"/>
         </return-value>
         <parameters>
-          <parameter name="str_out"
+          <parameter name="inoutarg"
+                     direction="inout"
+                     caller-allocates="0"
+                     transfer-ownership="full"
+                     allow-none="1">
+            <doc xml:whitespace="preserve">This is an argument test</doc>
+            <type name="gint" c:type="int*"/>
+          </parameter>
+        </parameters>
+      </method>
+      <method name="method" c:identifier="annotation_object_method">
+        <return-value transfer-ownership="none">
+          <doc xml:whitespace="preserve">an int</doc>
+          <type name="gint" c:type="gint"/>
+        </return-value>
+      </method>
+      <method name="notrans" c:identifier="annotation_object_notrans">
+        <return-value transfer-ownership="none">
+          <doc xml:whitespace="preserve">An object, not referenced</doc>
+          <type name="GObject.Object" c:type="GObject*"/>
+        </return-value>
+      </method>
+      <method name="out" c:identifier="annotation_object_out">
+        <doc xml:whitespace="preserve">This is a test for out arguments</doc>
+        <return-value transfer-ownership="none">
+          <doc xml:whitespace="preserve">an int</doc>
+          <type name="gint" c:type="gint"/>
+        </return-value>
+        <parameters>
+          <parameter name="outarg"
                      direction="out"
                      caller-allocates="0"
                      transfer-ownership="full">
-            <doc xml:whitespace="preserve">string return value</doc>
-            <type name="utf8" c:type="char**"/>
+            <doc xml:whitespace="preserve">This is an argument test</doc>
+            <type name="gint" c:type="int*"/>
           </parameter>
         </parameters>
       </method>
-      <method name="foreach" c:identifier="annotation_object_foreach">
-        <doc xml:whitespace="preserve">Test taking a call-scoped callback</doc>
+      <method name="parse_args" c:identifier="annotation_object_parse_args">
+        <doc xml:whitespace="preserve">Test taking a zero-terminated array with length parameter</doc>
         <return-value transfer-ownership="none">
           <type name="none" c:type="void"/>
         </return-value>
         <parameters>
-          <parameter name="func"
-                     transfer-ownership="none"
-                     scope="call"
-                     closure="2">
-            <doc xml:whitespace="preserve">Callback to invoke</doc>
-            <type name="ForeachFunc" c:type="AnnotationForeachFunc"/>
+          <parameter name="argc"
+                     direction="inout"
+                     caller-allocates="0"
+                     transfer-ownership="full">
+            <doc xml:whitespace="preserve">Length of the argument vector</doc>
+            <type name="gint" c:type="int*"/>
           </parameter>
-          <parameter name="user_data" transfer-ownership="none">
-            <doc xml:whitespace="preserve">Callback user data</doc>
-            <type name="any" c:type="gpointer"/>
+          <parameter name="argv"
+                     direction="inout"
+                     caller-allocates="0"
+                     transfer-ownership="full">
+            <doc xml:whitespace="preserve">Argument vector</doc>
+            <array length="1" c:type="char***">
+              <type name="utf8"/>
+            </array>
           </parameter>
         </parameters>
       </method>
@@ -402,12 +378,12 @@ intentionally similar example to gtk_container_get_children</doc>
           <parameter name="data" transfer-ownership="none">
             <doc xml:whitespace="preserve">The data</doc>
             <array length="2" c:type="guchar*">
-              <type name="uint8"/>
+              <type name="guint8"/>
             </array>
           </parameter>
           <parameter name="length" transfer-ownership="none">
             <doc xml:whitespace="preserve">Length of the data</doc>
-            <type name="gsize" c:type="gsize"/>
+            <type name="gulong" c:type="gsize"/>
           </parameter>
         </parameters>
       </method>
@@ -420,12 +396,12 @@ intentionally similar example to gtk_container_get_children</doc>
           <parameter name="data" transfer-ownership="none">
             <doc xml:whitespace="preserve">The data</doc>
             <array length="2" c:type="gchar*">
-              <type name="int8"/>
+              <type name="gint8"/>
             </array>
           </parameter>
           <parameter name="length" transfer-ownership="none">
             <doc xml:whitespace="preserve">Length of the data</doc>
-            <type name="gsize" c:type="gsize"/>
+            <type name="gulong" c:type="gsize"/>
           </parameter>
         </parameters>
       </method>
@@ -439,22 +415,42 @@ type.</doc>
           <parameter name="data" transfer-ownership="none">
             <doc xml:whitespace="preserve">The data</doc>
             <array length="2" c:type="gpointer">
-              <type name="uint8"/>
+              <type name="guint8"/>
             </array>
           </parameter>
           <parameter name="length" transfer-ownership="none">
             <doc xml:whitespace="preserve">Length of the data</doc>
-            <type name="gsize" c:type="gsize"/>
+            <type name="gulong" c:type="gsize"/>
           </parameter>
         </parameters>
       </method>
-      <method name="do_not_use"
-              c:identifier="annotation_object_do_not_use"
-              deprecated="Use annotation_object_create_object() instead."
-              deprecated-version="0.12">
-        <return-value transfer-ownership="full">
-          <type name="GObject.Object" c:type="GObject*"/>
+      <method name="string_out" c:identifier="annotation_object_string_out">
+        <doc xml:whitespace="preserve">Test returning a string as an out parameter</doc>
+        <return-value transfer-ownership="none">
+          <doc xml:whitespace="preserve">some boolean</doc>
+          <type name="gboolean" c:type="gboolean"/>
         </return-value>
+        <parameters>
+          <parameter name="str_out"
+                     direction="out"
+                     caller-allocates="0"
+                     transfer-ownership="full">
+            <doc xml:whitespace="preserve">string return value</doc>
+            <type name="utf8" c:type="char**"/>
+          </parameter>
+        </parameters>
+      </method>
+      <method name="use_buffer" c:identifier="annotation_object_use_buffer">
+        <return-value transfer-ownership="none">
+          <type name="none" c:type="void"/>
+        </return-value>
+        <parameters>
+          <parameter name="bytes" transfer-ownership="none">
+            <array c:type="guchar*">
+              <type name="guint8"/>
+            </array>
+          </parameter>
+        </parameters>
       </method>
       <method name="watch" c:identifier="annotation_object_watch_full">
         <doc xml:whitespace="preserve">Test overriding via the "Rename To" annotation.</doc>
@@ -472,7 +468,7 @@ type.</doc>
           </parameter>
           <parameter name="user_data" transfer-ownership="none">
             <doc xml:whitespace="preserve">The callback data</doc>
-            <type name="any" c:type="gpointer"/>
+            <type name="gpointer" c:type="gpointer"/>
           </parameter>
           <parameter name="destroy" transfer-ownership="none" scope="call">
             <doc xml:whitespace="preserve">Destroy notification</doc>
@@ -480,11 +476,15 @@ type.</doc>
           </parameter>
         </parameters>
       </method>
-      <method name="extra_annos" c:identifier="annotation_object_extra_annos">
-        <attribute name="org.foobar" value="testvalue"/>
+      <method name="with_voidp" c:identifier="annotation_object_with_voidp">
         <return-value transfer-ownership="none">
           <type name="none" c:type="void"/>
         </return-value>
+        <parameters>
+          <parameter name="data" transfer-ownership="none">
+            <type name="gpointer" c:type="void*"/>
+          </parameter>
+        </parameters>
       </method>
       <property name="function-property"
                 writable="1"
@@ -532,7 +532,7 @@ type.</doc>
         </return-value>
         <parameters>
           <parameter name="object" transfer-ownership="none">
-            <type name="any" c:type="gpointer"/>
+            <type name="gpointer" c:type="gpointer"/>
           </parameter>
         </parameters>
       </glib:signal>
@@ -588,7 +588,7 @@ it says it's pointer but it's actually a string.</doc>
         <attribute name="yet.another.annotation" value="another_value"/>
         <attribute name="some.other.annotation" value="value2"/>
         <doc xml:whitespace="preserve">The return value.</doc>
-        <type name="int" c:type="gint"/>
+        <type name="gint" c:type="gint"/>
       </return-value>
       <parameters>
         <parameter name="object" transfer-ownership="none">
@@ -622,7 +622,7 @@ detection, and fixing it via annotations.</doc>
           <type name="NotifyFunc" c:type="AnnotationNotifyFunc"/>
         </parameter>
         <parameter name="data" transfer-ownership="none">
-          <type name="any" c:type="gpointer"/>
+          <type name="gpointer" c:type="gpointer"/>
         </parameter>
       </parameters>
     </function>
@@ -642,7 +642,7 @@ detection, and fixing it via annotations.</doc>
                    caller-allocates="0"
                    transfer-ownership="full">
           <doc xml:whitespace="preserve">The number of args.</doc>
-          <type name="int" c:type="int*"/>
+          <type name="gint" c:type="int*"/>
         </parameter>
         <parameter name="argv"
                    direction="inout"
@@ -663,7 +663,7 @@ detection, and fixing it via annotations.</doc>
       <parameters>
         <parameter name="foo" transfer-ownership="none">
           <doc xml:whitespace="preserve">some text (e.g. example) or else</doc>
-          <type name="int" c:type="int"/>
+          <type name="gint" c:type="int"/>
         </parameter>
       </parameters>
     </function>
@@ -693,7 +693,7 @@ detection, and fixing it via annotations.</doc>
                    caller-allocates="0"
                    transfer-ownership="full">
           <doc xml:whitespace="preserve">Number of return values</doc>
-          <type name="int" c:type="int*"/>
+          <type name="gint" c:type="int*"/>
         </parameter>
       </parameters>
     </function>
@@ -715,7 +715,7 @@ detection, and fixing it via annotations.</doc>
       </return-value>
       <parameters>
         <parameter name="n_properties" transfer-ownership="none">
-          <type name="uint" c:type="guint"/>
+          <type name="guint" c:type="guint"/>
         </parameter>
         <parameter name="properties" transfer-ownership="none">
           <array length="0" c:type="gchar*">
diff --git a/tests/scanner/Bar-1.0-expected.gir b/tests/scanner/Bar-1.0-expected.gir
index 0f665a6..dee28b3 100644
--- a/tests/scanner/Bar-1.0-expected.gir
+++ b/tests/scanner/Bar-1.0-expected.gir
@@ -38,10 +38,10 @@ and/or use gtk-doc annotations.  -->
       </return-value>
       <parameters>
         <parameter name="x" transfer-ownership="none">
-          <type name="int" c:type="int"/>
+          <type name="gint" c:type="int"/>
         </parameter>
         <parameter name="y" transfer-ownership="none">
-          <type name="double" c:type="double"/>
+          <type name="gdouble" c:type="double"/>
         </parameter>
       </parameters>
     </function>
diff --git a/tests/scanner/Foo-1.0-expected.gir b/tests/scanner/Foo-1.0-expected.gir
index e14d3c8..c2dd730 100644
--- a/tests/scanner/Foo-1.0-expected.gir
+++ b/tests/scanner/Foo-1.0-expected.gir
@@ -17,7 +17,7 @@ and/or use gtk-doc annotations.  -->
              shared-library="libfoo.so"
              c:prefix="Foo">
     <alias name="ObjectCookie" c:type="FooObjectCookie">
-      <type name="any"/>
+      <type name="gpointer"/>
     </alias>
     <alias name="XEvent" c:type="FooXEvent">
       <type name="none"/>
@@ -37,10 +37,10 @@ and/or use gtk-doc annotations.  -->
             glib:type-name="FooBRect"
             glib:get-type="foo_brect_get_type">
       <field name="x" writable="1">
-        <type name="double" c:type="double"/>
+        <type name="gdouble" c:type="double"/>
       </field>
       <field name="y" writable="1">
-        <type name="double" c:type="double"/>
+        <type name="gdouble" c:type="double"/>
       </field>
       <constructor name="new" c:identifier="foo_brect_new">
         <return-value transfer-ownership="full">
@@ -48,10 +48,10 @@ and/or use gtk-doc annotations.  -->
         </return-value>
         <parameters>
           <parameter name="x" transfer-ownership="none">
-            <type name="double" c:type="double"/>
+            <type name="gdouble" c:type="double"/>
           </parameter>
           <parameter name="y" transfer-ownership="none">
-            <type name="double" c:type="double"/>
+            <type name="gdouble" c:type="double"/>
           </parameter>
         </parameters>
       </constructor>
@@ -71,10 +71,10 @@ and/or use gtk-doc annotations.  -->
            glib:type-name="FooBUnion"
            glib:get-type="foo_bunion_get_type">
       <field name="type" writable="1">
-        <type name="int" c:type="int"/>
+        <type name="gint" c:type="int"/>
       </field>
       <field name="v" writable="1">
-        <type name="double" c:type="double"/>
+        <type name="gdouble" c:type="double"/>
       </field>
       <field name="rect" writable="1">
         <type name="BRect" c:type="FooBRect*"/>
@@ -87,7 +87,7 @@ and/or use gtk-doc annotations.  -->
       <method name="get_contained_type"
               c:identifier="foo_bunion_get_contained_type">
         <return-value transfer-ownership="none">
-          <type name="int" c:type="int"/>
+          <type name="gint" c:type="int"/>
         </return-value>
       </method>
     </union>
@@ -125,17 +125,17 @@ and/or use gtk-doc annotations.  -->
     </record>
     <callback name="Callback" c:type="FooCallback">
       <return-value transfer-ownership="none">
-        <type name="boolean" c:type="gboolean"/>
+        <type name="gboolean" c:type="gboolean"/>
       </return-value>
       <parameters>
         <parameter name="foo" transfer-ownership="none">
           <type name="Object" c:type="FooObject*"/>
         </parameter>
         <parameter name="b" transfer-ownership="none">
-          <type name="boolean" c:type="gboolean"/>
+          <type name="gboolean" c:type="gboolean"/>
         </parameter>
         <parameter name="data" transfer-ownership="none">
-          <type name="any" c:type="gpointer"/>
+          <type name="gpointer" c:type="gpointer"/>
         </parameter>
       </parameters>
     </callback>
@@ -200,7 +200,7 @@ and/or use gtk-doc annotations.  -->
     </enumeration>
     <union name="Event" c:type="FooEvent">
       <field name="type" writable="1">
-        <type name="int" c:type="int"/>
+        <type name="gint" c:type="int"/>
       </field>
       <field name="any" writable="1">
         <type name="EventAny" c:type="FooEventAny"/>
@@ -211,15 +211,15 @@ and/or use gtk-doc annotations.  -->
     </union>
     <record name="EventAny" c:type="FooEventAny">
       <field name="send_event" writable="1">
-        <type name="int8" c:type="gint8"/>
+        <type name="gint8" c:type="gint8"/>
       </field>
     </record>
     <record name="EventExpose" c:type="FooEventExpose">
       <field name="send_event" writable="1">
-        <type name="int8" c:type="gint8"/>
+        <type name="gint8" c:type="gint8"/>
       </field>
       <field name="count" writable="1">
-        <type name="int" c:type="gint"/>
+        <type name="gint" c:type="gint"/>
       </field>
     </record>
     <bitfield name="FlagsNoType" c:type="FooFlagsNoType">
@@ -246,7 +246,7 @@ and/or use gtk-doc annotations.  -->
     </bitfield>
     <record name="ForeignStruct" c:type="FooForeignStruct" foreign="1">
       <field name="foo" writable="1">
-        <type name="int" c:type="int"/>
+        <type name="gint" c:type="int"/>
       </field>
     </record>
     <interface name="Interface"
@@ -260,7 +260,7 @@ and/or use gtk-doc annotations.  -->
         </return-value>
         <parameters>
           <parameter name="x" transfer-ownership="none">
-            <type name="int" c:type="int"/>
+            <type name="gint" c:type="int"/>
           </parameter>
         </parameters>
       </virtual-method>
@@ -270,7 +270,7 @@ and/or use gtk-doc annotations.  -->
         </return-value>
         <parameters>
           <parameter name="x" transfer-ownership="none">
-            <type name="int" c:type="int"/>
+            <type name="gint" c:type="int"/>
           </parameter>
         </parameters>
       </method>
@@ -291,7 +291,7 @@ and/or use gtk-doc annotations.  -->
               <type name="Interface" c:type="FooInterface*"/>
             </parameter>
             <parameter name="x" transfer-ownership="none">
-              <type name="int" c:type="int"/>
+              <type name="gint" c:type="int"/>
             </parameter>
           </parameters>
         </callback>
@@ -309,11 +309,6 @@ and/or use gtk-doc annotations.  -->
           <type name="Object" c:type="FooObject*"/>
         </return-value>
       </constructor>
-      <function name="static_meth" c:identifier="foo_object_static_meth">
-        <return-value transfer-ownership="none">
-          <type name="int" c:type="int"/>
-        </return-value>
-      </function>
       <function name="get_default" c:identifier="foo_object_get_default">
         <doc xml:whitespace="preserve">This function is intended to match clutter_stage_get_default which
 uses a C sugar return type.</doc>
@@ -322,16 +317,11 @@ uses a C sugar return type.</doc>
           <type name="Subobject" c:type="FooObject*"/>
         </return-value>
       </function>
-      <virtual-method name="virtual_method" invoker="virtual_method">
+      <function name="static_meth" c:identifier="foo_object_static_meth">
         <return-value transfer-ownership="none">
-          <type name="boolean" c:type="gboolean"/>
+          <type name="gint" c:type="int"/>
         </return-value>
-        <parameters>
-          <parameter name="first_param" transfer-ownership="none">
-            <type name="int" c:type="int"/>
-          </parameter>
-        </parameters>
-      </virtual-method>
+      </function>
       <virtual-method name="read_fn" invoker="read">
         <doc xml:whitespace="preserve">Read some stuff.</doc>
         <return-value transfer-ownership="none">
@@ -340,45 +330,56 @@ uses a C sugar return type.</doc>
         <parameters>
           <parameter name="offset" transfer-ownership="none">
             <doc xml:whitespace="preserve">offset</doc>
-            <type name="int" c:type="int"/>
+            <type name="gint" c:type="int"/>
           </parameter>
           <parameter name="length" transfer-ownership="none">
             <doc xml:whitespace="preserve">length</doc>
-            <type name="int" c:type="int"/>
+            <type name="gint" c:type="int"/>
           </parameter>
         </parameters>
       </virtual-method>
+      <virtual-method name="virtual_method" invoker="virtual_method">
+        <return-value transfer-ownership="none">
+          <type name="gboolean" c:type="gboolean"/>
+        </return-value>
+        <parameters>
+          <parameter name="first_param" transfer-ownership="none">
+            <type name="gint" c:type="int"/>
+          </parameter>
+        </parameters>
+      </virtual-method>
+      <method name="dup_name" c:identifier="foo_object_dup_name">
+        <return-value transfer-ownership="full">
+          <type name="utf8" c:type="char*"/>
+        </return-value>
+      </method>
       <method name="external_type" c:identifier="foo_object_external_type">
         <return-value transfer-ownership="full">
           <type name="Utility.Object" c:type="UtilityObject*"/>
         </return-value>
       </method>
-      <method name="various" c:identifier="foo_object_various">
+      <method name="get_name" c:identifier="foo_object_get_name">
+        <return-value transfer-ownership="none">
+          <type name="utf8" c:type="char*"/>
+        </return-value>
+      </method>
+      <method name="handle_glyph" c:identifier="foo_object_handle_glyph">
         <return-value transfer-ownership="none">
           <type name="none" c:type="void"/>
         </return-value>
         <parameters>
-          <parameter name="data" transfer-ownership="none">
-            <type name="any" c:type="void*"/>
-          </parameter>
-          <parameter name="some_type" transfer-ownership="none">
-            <type name="GType" c:type="GType"/>
+          <parameter name="glyph" transfer-ownership="none">
+            <type name="Utility.Glyph" c:type="UtilityGlyph"/>
           </parameter>
         </parameters>
       </method>
-      <method name="take_all"
-              c:identifier="foo_object_take_all"
-              introspectable="0">
+      <method name="is_it_time_yet" c:identifier="foo_object_is_it_time_yet">
         <return-value transfer-ownership="none">
           <type name="none" c:type="void"/>
         </return-value>
         <parameters>
-          <parameter name="x" transfer-ownership="none">
-            <type name="int" c:type="int"/>
-          </parameter>
-          <parameter transfer-ownership="none">
-            <varargs>
-            </varargs>
+          <parameter name="time" transfer-ownership="none">
+            <type name="glong" c:type="time_t"/>
           </parameter>
         </parameters>
       </method>
@@ -392,69 +393,68 @@ uses a C sugar return type.</doc>
           </parameter>
         </parameters>
       </method>
-      <method name="is_it_time_yet" c:identifier="foo_object_is_it_time_yet">
+      <method name="read" c:identifier="foo_object_read">
+        <doc xml:whitespace="preserve">Read some stuff.</doc>
         <return-value transfer-ownership="none">
           <type name="none" c:type="void"/>
         </return-value>
         <parameters>
-          <parameter name="time" transfer-ownership="none">
-            <type name="long" c:type="time_t"/>
+          <parameter name="offset" transfer-ownership="none">
+            <doc xml:whitespace="preserve">offset</doc>
+            <type name="gint" c:type="int"/>
+          </parameter>
+          <parameter name="length" transfer-ownership="none">
+            <doc xml:whitespace="preserve">length</doc>
+            <type name="gint" c:type="int"/>
           </parameter>
         </parameters>
       </method>
-      <method name="get_name" c:identifier="foo_object_get_name">
+      <method name="skipped_method"
+              c:identifier="foo_object_skipped_method"
+              introspectable="0">
+        <doc xml:whitespace="preserve">This is only useful from C.</doc>
         <return-value transfer-ownership="none">
-          <type name="utf8" c:type="char*"/>
-        </return-value>
-      </method>
-      <method name="dup_name" c:identifier="foo_object_dup_name">
-        <return-value transfer-ownership="full">
-          <type name="utf8" c:type="char*"/>
+          <type name="none" c:type="void"/>
         </return-value>
       </method>
-      <method name="handle_glyph" c:identifier="foo_object_handle_glyph">
+      <method name="take_all"
+              c:identifier="foo_object_take_all"
+              introspectable="0">
         <return-value transfer-ownership="none">
           <type name="none" c:type="void"/>
         </return-value>
         <parameters>
-          <parameter name="glyph" transfer-ownership="none">
-            <type name="Utility.Glyph" c:type="UtilityGlyph"/>
+          <parameter name="x" transfer-ownership="none">
+            <type name="gint" c:type="int"/>
           </parameter>
-        </parameters>
-      </method>
-      <method name="virtual_method" c:identifier="foo_object_virtual_method">
-        <return-value transfer-ownership="none">
-          <type name="boolean" c:type="gboolean"/>
-        </return-value>
-        <parameters>
-          <parameter name="first_param" transfer-ownership="none">
-            <type name="int" c:type="int"/>
+          <parameter transfer-ownership="none">
+            <varargs>
+            </varargs>
           </parameter>
         </parameters>
       </method>
-      <method name="read" c:identifier="foo_object_read">
-        <doc xml:whitespace="preserve">Read some stuff.</doc>
+      <method name="various" c:identifier="foo_object_various">
         <return-value transfer-ownership="none">
           <type name="none" c:type="void"/>
         </return-value>
         <parameters>
-          <parameter name="offset" transfer-ownership="none">
-            <doc xml:whitespace="preserve">offset</doc>
-            <type name="int" c:type="int"/>
+          <parameter name="data" transfer-ownership="none">
+            <type name="gpointer" c:type="void*"/>
           </parameter>
-          <parameter name="length" transfer-ownership="none">
-            <doc xml:whitespace="preserve">length</doc>
-            <type name="int" c:type="int"/>
+          <parameter name="some_type" transfer-ownership="none">
+            <type name="GType" c:type="GType"/>
           </parameter>
         </parameters>
       </method>
-      <method name="skipped_method"
-              c:identifier="foo_object_skipped_method"
-              introspectable="0">
-        <doc xml:whitespace="preserve">This is only useful from C.</doc>
+      <method name="virtual_method" c:identifier="foo_object_virtual_method">
         <return-value transfer-ownership="none">
-          <type name="none" c:type="void"/>
+          <type name="gboolean" c:type="gboolean"/>
         </return-value>
+        <parameters>
+          <parameter name="first_param" transfer-ownership="none">
+            <type name="gint" c:type="int"/>
+          </parameter>
+        </parameters>
       </method>
       <property name="string"
                 writable="1"
@@ -466,7 +466,7 @@ uses a C sugar return type.</doc>
         <type name="GObject.Object" c:type="GObject"/>
       </field>
       <field name="some_int">
-        <type name="int" c:type="int"/>
+        <type name="gint" c:type="int"/>
       </field>
       <glib:signal name="signal">
         <return-value transfer-ownership="full">
@@ -477,7 +477,7 @@ uses a C sugar return type.</doc>
             <type name="GObject.Object" c:type="GObject"/>
           </parameter>
           <parameter name="p0" transfer-ownership="none">
-            <type name="any" c:type="gpointer"/>
+            <type name="gpointer" c:type="gpointer"/>
           </parameter>
         </parameters>
       </glib:signal>
@@ -491,14 +491,14 @@ uses a C sugar return type.</doc>
       <field name="virtual_method">
         <callback name="virtual_method" c:type="virtual_method">
           <return-value transfer-ownership="none">
-            <type name="boolean" c:type="gboolean"/>
+            <type name="gboolean" c:type="gboolean"/>
           </return-value>
           <parameters>
             <parameter name="object" transfer-ownership="none">
               <type name="Object" c:type="FooObject*"/>
             </parameter>
             <parameter name="first_param" transfer-ownership="none">
-              <type name="int" c:type="int"/>
+              <type name="gint" c:type="int"/>
             </parameter>
           </parameters>
         </callback>
@@ -514,11 +514,11 @@ uses a C sugar return type.</doc>
             </parameter>
             <parameter name="offset" transfer-ownership="none">
               <doc xml:whitespace="preserve">offset</doc>
-              <type name="int" c:type="int"/>
+              <type name="gint" c:type="int"/>
             </parameter>
             <parameter name="length" transfer-ownership="none">
               <doc xml:whitespace="preserve">length</doc>
-              <type name="int" c:type="int"/>
+              <type name="gint" c:type="int"/>
             </parameter>
           </parameters>
         </callback>
@@ -530,20 +530,20 @@ uses a C sugar return type.</doc>
       </field>
     </record>
     <constant name="PIE_IS_TASTY" value="3.14159">
-      <type name="double"/>
+      <type name="gdouble"/>
     </constant>
     <record name="Rectangle" c:type="FooRectangle">
       <field name="x" writable="1">
-        <type name="int" c:type="gint"/>
+        <type name="gint" c:type="gint"/>
       </field>
       <field name="y" writable="1">
-        <type name="int" c:type="gint"/>
+        <type name="gint" c:type="gint"/>
       </field>
       <field name="width" writable="1">
-        <type name="int" c:type="gint"/>
+        <type name="gint" c:type="gint"/>
       </field>
       <field name="height" writable="1">
-        <type name="int" c:type="gint"/>
+        <type name="gint" c:type="gint"/>
       </field>
       <constructor name="new" c:identifier="foo_rectangle_new">
         <return-value transfer-ownership="full">
@@ -551,16 +551,16 @@ uses a C sugar return type.</doc>
         </return-value>
         <parameters>
           <parameter name="x" transfer-ownership="none">
-            <type name="int" c:type="int"/>
+            <type name="gint" c:type="int"/>
           </parameter>
           <parameter name="y" transfer-ownership="none">
-            <type name="int" c:type="int"/>
+            <type name="gint" c:type="int"/>
           </parameter>
           <parameter name="width" transfer-ownership="none">
-            <type name="int" c:type="int"/>
+            <type name="gint" c:type="int"/>
           </parameter>
           <parameter name="height" transfer-ownership="none">
-            <type name="int" c:type="int"/>
+            <type name="gint" c:type="int"/>
           </parameter>
         </parameters>
       </constructor>
@@ -577,7 +577,7 @@ uses a C sugar return type.</doc>
       </method>
     </record>
     <constant name="SUCCESS_INT" value="4408">
-      <type name="int"/>
+      <type name="gint"/>
     </constant>
     <enumeration name="Skippable" introspectable="0" c:type="FooSkippable">
       <doc xml:whitespace="preserve">Some type that is only interesting from C and should not be
@@ -605,7 +605,7 @@ exposed to language bindings.</doc>
         <type name="StructPrivate" c:type="FooStructPrivate*"/>
       </field>
       <field name="member" writable="1">
-        <type name="int" c:type="int"/>
+        <type name="gint" c:type="int"/>
       </field>
     </record>
     <record name="StructPrivate" c:type="FooStructPrivate">
@@ -689,23 +689,23 @@ exposed to language bindings.</doc>
     </record>
     <record name="ThingWithArray" c:type="_FooThingWithArray">
       <field name="x" writable="1">
-        <type name="int" c:type="int"/>
+        <type name="gint" c:type="int"/>
       </field>
       <field name="y" writable="1">
-        <type name="int" c:type="int"/>
+        <type name="gint" c:type="int"/>
       </field>
       <field name="lines" writable="1">
         <array zero-terminated="0" c:type="char" fixed-size="80">
-          <type name="int8"/>
+          <type name="gchar"/>
         </array>
       </field>
       <field name="data" writable="1">
-        <type name="any" c:type="guchar*"/>
+        <type name="gpointer" c:type="guchar*"/>
       </field>
     </record>
     <union name="Union" c:type="_FooUnion">
       <field name="foo" writable="1">
-        <type name="int" c:type="int"/>
+        <type name="gint" c:type="int"/>
       </field>
     </union>
     <record name="UtilityStruct" c:type="FooUtilityStruct">
@@ -745,7 +745,7 @@ exposed to language bindings.</doc>
           <type name="Gio.AsyncReadyCallback" c:type="GAsyncReadyCallback"/>
         </parameter>
         <parameter name="user_data" transfer-ownership="none">
-          <type name="any" c:type="gpointer"/>
+          <type name="gpointer" c:type="gpointer"/>
         </parameter>
       </parameters>
     </function>
@@ -763,7 +763,7 @@ exposed to language bindings.</doc>
           <type name="Callback" c:type="FooCallback"/>
         </parameter>
         <parameter name="data" transfer-ownership="none">
-          <type name="any" c:type="gpointer"/>
+          <type name="gpointer" c:type="gpointer"/>
         </parameter>
         <parameter name="destroy" transfer-ownership="none" scope="call">
           <type name="GLib.DestroyNotify" c:type="GDestroyNotify"/>
@@ -772,7 +772,7 @@ exposed to language bindings.</doc>
     </function>
     <function name="enum_type_method" c:identifier="foo_enum_type_method">
       <return-value transfer-ownership="none">
-        <type name="int" c:type="int"/>
+        <type name="gint" c:type="int"/>
       </return-value>
       <parameters>
         <parameter name="foo_enum" transfer-ownership="none">
@@ -786,13 +786,13 @@ exposed to language bindings.</doc>
       </return-value>
       <parameters>
         <parameter name="x" transfer-ownership="none">
-          <type name="int" c:type="int"/>
+          <type name="gint" c:type="int"/>
         </parameter>
       </parameters>
     </function>
     <function name="init" c:identifier="foo_init">
       <return-value transfer-ownership="none">
-        <type name="int" c:type="gint"/>
+        <type name="gint" c:type="gint"/>
       </return-value>
     </function>
     <function name="method_external_references"
@@ -901,7 +901,7 @@ exposed to language bindings.</doc>
       </return-value>
       <parameters>
         <parameter name="unsigned_param" transfer-ownership="none">
-          <type name="uint" c:type="unsigned int"/>
+          <type name="guint" c:type="unsigned int"/>
         </parameter>
       </parameters>
     </function>
@@ -911,7 +911,7 @@ exposed to language bindings.</doc>
       </return-value>
       <parameters>
         <parameter name="unsigned_param" transfer-ownership="none">
-          <type name="uint" c:type="unsigned"/>
+          <type name="guint" c:type="unsigned"/>
         </parameter>
       </parameters>
     </function>
@@ -923,7 +923,7 @@ exposed to language bindings.</doc>
       </return-value>
       <parameters>
         <parameter name="i" transfer-ownership="none">
-          <type name="int" c:type="gint"/>
+          <type name="gint" c:type="gint"/>
         </parameter>
         <parameter name="callback" transfer-ownership="none" scope="call">
           <type name="VarargsCallback" c:type="FooVarargsCallback"/>
diff --git a/tests/scanner/Regress-1.0-expected.gir b/tests/scanner/Regress-1.0-expected.gir
index 2825c52..ef3059c 100644
--- a/tests/scanner/Regress-1.0-expected.gir
+++ b/tests/scanner/Regress-1.0-expected.gir
@@ -19,7 +19,7 @@ and/or use gtk-doc annotations.  -->
             glib:type-name="RegressTestBoxed"
             glib:get-type="regress_test_boxed_get_type">
       <field name="some_int8" writable="1">
-        <type name="int8" c:type="gint8"/>
+        <type name="gint8" c:type="gint8"/>
       </field>
       <field name="nested_a" writable="1">
         <type name="TestSimpleBoxedA" c:type="RegressTestSimpleBoxedA"/>
@@ -39,7 +39,7 @@ and/or use gtk-doc annotations.  -->
         </return-value>
         <parameters>
           <parameter name="i" transfer-ownership="none">
-            <type name="int" c:type="int"/>
+            <type name="gint" c:type="int"/>
           </parameter>
         </parameters>
       </constructor>
@@ -50,10 +50,10 @@ and/or use gtk-doc annotations.  -->
         </return-value>
         <parameters>
           <parameter name="i" transfer-ownership="none">
-            <type name="int" c:type="int"/>
+            <type name="gint" c:type="int"/>
           </parameter>
           <parameter name="j" transfer-ownership="none">
-            <type name="int" c:type="int"/>
+            <type name="gint" c:type="int"/>
           </parameter>
         </parameters>
       </constructor>
@@ -75,7 +75,7 @@ and/or use gtk-doc annotations.  -->
       </method>
       <method name="equals" c:identifier="regress_test_boxed_equals">
         <return-value transfer-ownership="none">
-          <type name="boolean" c:type="gboolean"/>
+          <type name="gboolean" c:type="gboolean"/>
         </return-value>
         <parameters>
           <parameter name="other" transfer-ownership="none">
@@ -88,16 +88,16 @@ and/or use gtk-doc annotations.  -->
     </record>
     <callback name="TestCallback" c:type="RegressTestCallback">
       <return-value transfer-ownership="none">
-        <type name="int" c:type="int"/>
+        <type name="gint" c:type="int"/>
       </return-value>
     </callback>
     <callback name="TestCallbackUserData" c:type="RegressTestCallbackUserData">
       <return-value transfer-ownership="none">
-        <type name="int" c:type="int"/>
+        <type name="gint" c:type="int"/>
       </return-value>
       <parameters>
         <parameter name="user_data" transfer-ownership="none" closure="0">
-          <type name="any" c:type="gpointer"/>
+          <type name="gpointer" c:type="gpointer"/>
         </parameter>
       </parameters>
     </callback>
@@ -187,10 +187,10 @@ and/or use gtk-doc annotations.  -->
         <type name="GObject.TypeInstance" c:type="GTypeInstance"/>
       </field>
       <field name="refcount">
-        <type name="int" c:type="gint"/>
+        <type name="gint" c:type="gint"/>
       </field>
       <field name="flags">
-        <type name="uint" c:type="guint"/>
+        <type name="guint" c:type="guint"/>
       </field>
     </class>
     <record name="TestFundamentalObjectClass"
@@ -287,18 +287,6 @@ and/or use gtk-doc annotations.  -->
            glib:type-name="RegressTestObj"
            glib:get-type="regress_test_obj_get_type"
            glib:type-struct="TestObjClass">
-      <constructor name="new_from_file"
-                   c:identifier="regress_test_obj_new_from_file"
-                   throws="1">
-        <return-value transfer-ownership="full">
-          <type name="TestObj" c:type="RegressTestObj*"/>
-        </return-value>
-        <parameters>
-          <parameter name="x" transfer-ownership="none">
-            <type name="utf8" c:type="char*"/>
-          </parameter>
-        </parameters>
-      </constructor>
       <constructor name="new_callback"
                    c:identifier="regress_test_obj_new_callback">
         <return-value transfer-ownership="full">
@@ -314,21 +302,33 @@ and/or use gtk-doc annotations.  -->
                   c:type="RegressTestCallbackUserData"/>
           </parameter>
           <parameter name="user_data" transfer-ownership="none">
-            <type name="any" c:type="gpointer"/>
+            <type name="gpointer" c:type="gpointer"/>
           </parameter>
           <parameter name="notify" transfer-ownership="none" scope="call">
             <type name="GLib.DestroyNotify" c:type="GDestroyNotify"/>
           </parameter>
         </parameters>
       </constructor>
+      <constructor name="new_from_file"
+                   c:identifier="regress_test_obj_new_from_file"
+                   throws="1">
+        <return-value transfer-ownership="full">
+          <type name="TestObj" c:type="RegressTestObj*"/>
+        </return-value>
+        <parameters>
+          <parameter name="x" transfer-ownership="none">
+            <type name="utf8" c:type="char*"/>
+          </parameter>
+        </parameters>
+      </constructor>
       <function name="static_method"
                 c:identifier="regress_test_obj_static_method">
         <return-value transfer-ownership="none">
-          <type name="double" c:type="double"/>
+          <type name="gdouble" c:type="double"/>
         </return-value>
         <parameters>
           <parameter name="x" transfer-ownership="none">
-            <type name="int" c:type="int"/>
+            <type name="gint" c:type="int"/>
           </parameter>
         </parameters>
       </function>
@@ -351,7 +351,7 @@ and/or use gtk-doc annotations.  -->
 slot name, which makes it useful for testing bindings handle this
 case.</doc>
         <return-value transfer-ownership="none">
-          <type name="int" c:type="int"/>
+          <type name="gint" c:type="int"/>
         </return-value>
         <parameters>
           <parameter name="somestr" transfer-ownership="none">
@@ -360,22 +360,60 @@ case.</doc>
           </parameter>
         </parameters>
       </virtual-method>
-      <method name="set_bare" c:identifier="regress_test_obj_set_bare">
+      <method name="do_matrix" c:identifier="regress_test_obj_do_matrix">
+        <doc xml:whitespace="preserve">This method is virtual.  Notably its name differs from the virtual
+slot name, which makes it useful for testing bindings handle this
+case.</doc>
         <return-value transfer-ownership="none">
-          <type name="none" c:type="void"/>
+          <type name="gint" c:type="int"/>
         </return-value>
         <parameters>
-          <parameter name="bare" transfer-ownership="none" allow-none="1">
-            <type name="GObject.Object" c:type="GObject*"/>
+          <parameter name="somestr" transfer-ownership="none">
+            <doc xml:whitespace="preserve">Meaningless string</doc>
+            <type name="utf8" c:type="char*"/>
           </parameter>
         </parameters>
       </method>
       <method name="instance_method"
               c:identifier="regress_test_obj_instance_method">
         <return-value transfer-ownership="none">
-          <type name="int" c:type="int"/>
+          <type name="gint" c:type="int"/>
+        </return-value>
+      </method>
+      <method name="instance_method_callback"
+              c:identifier="regress_test_obj_instance_method_callback">
+        <return-value transfer-ownership="none">
+          <type name="none" c:type="void"/>
+        </return-value>
+        <parameters>
+          <parameter name="callback"
+                     transfer-ownership="none"
+                     allow-none="1"
+                     scope="call">
+            <type name="TestCallback" c:type="RegressTestCallback"/>
+          </parameter>
+        </parameters>
+      </method>
+      <method name="null_in" c:identifier="regress_test_obj_null_in">
+        <return-value transfer-ownership="none">
+          <type name="none" c:type="void"/>
+        </return-value>
+      </method>
+      <method name="null_out" c:identifier="regress_test_obj_null_out">
+        <return-value transfer-ownership="none">
+          <type name="none" c:type="void"/>
         </return-value>
       </method>
+      <method name="set_bare" c:identifier="regress_test_obj_set_bare">
+        <return-value transfer-ownership="none">
+          <type name="none" c:type="void"/>
+        </return-value>
+        <parameters>
+          <parameter name="bare" transfer-ownership="none" allow-none="1">
+            <type name="GObject.Object" c:type="GObject*"/>
+          </parameter>
+        </parameters>
+      </method>
       <method name="torture_signature_0"
               c:identifier="regress_test_obj_torture_signature_0">
         <return-value transfer-ownership="none">
@@ -383,19 +421,19 @@ case.</doc>
         </return-value>
         <parameters>
           <parameter name="x" transfer-ownership="none">
-            <type name="int" c:type="int"/>
+            <type name="gint" c:type="int"/>
           </parameter>
           <parameter name="y"
                      direction="out"
                      caller-allocates="0"
                      transfer-ownership="full">
-            <type name="double" c:type="double*"/>
+            <type name="gdouble" c:type="double*"/>
           </parameter>
           <parameter name="z"
                      direction="out"
                      caller-allocates="0"
                      transfer-ownership="full">
-            <type name="int" c:type="int*"/>
+            <type name="gint" c:type="int*"/>
           </parameter>
           <parameter name="foo" transfer-ownership="none">
             <type name="utf8" c:type="char*"/>
@@ -404,10 +442,10 @@ case.</doc>
                      direction="out"
                      caller-allocates="0"
                      transfer-ownership="full">
-            <type name="int" c:type="int*"/>
+            <type name="gint" c:type="int*"/>
           </parameter>
           <parameter name="m" transfer-ownership="none">
-            <type name="uint" c:type="guint"/>
+            <type name="guint" c:type="guint"/>
           </parameter>
         </parameters>
       </method>
@@ -416,23 +454,23 @@ case.</doc>
               throws="1">
         <doc xml:whitespace="preserve">This function throws an error if m is odd.</doc>
         <return-value transfer-ownership="none">
-          <type name="boolean" c:type="gboolean"/>
+          <type name="gboolean" c:type="gboolean"/>
         </return-value>
         <parameters>
           <parameter name="x" transfer-ownership="none">
-            <type name="int" c:type="int"/>
+            <type name="gint" c:type="int"/>
           </parameter>
           <parameter name="y"
                      direction="out"
                      caller-allocates="0"
                      transfer-ownership="full">
-            <type name="double" c:type="double*"/>
+            <type name="gdouble" c:type="double*"/>
           </parameter>
           <parameter name="z"
                      direction="out"
                      caller-allocates="0"
                      transfer-ownership="full">
-            <type name="int" c:type="int*"/>
+            <type name="gint" c:type="int*"/>
           </parameter>
           <parameter name="foo" transfer-ownership="none">
             <type name="utf8" c:type="char*"/>
@@ -441,48 +479,10 @@ case.</doc>
                      direction="out"
                      caller-allocates="0"
                      transfer-ownership="full">
-            <type name="int" c:type="int*"/>
+            <type name="gint" c:type="int*"/>
           </parameter>
           <parameter name="m" transfer-ownership="none">
-            <type name="uint" c:type="guint"/>
-          </parameter>
-        </parameters>
-      </method>
-      <method name="do_matrix" c:identifier="regress_test_obj_do_matrix">
-        <doc xml:whitespace="preserve">This method is virtual.  Notably its name differs from the virtual
-slot name, which makes it useful for testing bindings handle this
-case.</doc>
-        <return-value transfer-ownership="none">
-          <type name="int" c:type="int"/>
-        </return-value>
-        <parameters>
-          <parameter name="somestr" transfer-ownership="none">
-            <doc xml:whitespace="preserve">Meaningless string</doc>
-            <type name="utf8" c:type="char*"/>
-          </parameter>
-        </parameters>
-      </method>
-      <method name="null_in" c:identifier="regress_test_obj_null_in">
-        <return-value transfer-ownership="none">
-          <type name="none" c:type="void"/>
-        </return-value>
-      </method>
-      <method name="null_out" c:identifier="regress_test_obj_null_out">
-        <return-value transfer-ownership="none">
-          <type name="none" c:type="void"/>
-        </return-value>
-      </method>
-      <method name="instance_method_callback"
-              c:identifier="regress_test_obj_instance_method_callback">
-        <return-value transfer-ownership="none">
-          <type name="none" c:type="void"/>
-        </return-value>
-        <parameters>
-          <parameter name="callback"
-                     transfer-ownership="none"
-                     allow-none="1"
-                     scope="call">
-            <type name="TestCallback" c:type="RegressTestCallback"/>
+            <type name="guint" c:type="guint"/>
           </parameter>
         </parameters>
       </method>
@@ -495,7 +495,7 @@ case.</doc>
       <property name="hash-table" writable="1" transfer-ownership="container">
         <type name="GLib.HashTable" c:type="GHashTable">
           <type name="utf8"/>
-          <type name="int8"/>
+          <type name="gint8"/>
         </type>
       </property>
       <property name="list" writable="1" transfer-ownership="none">
@@ -517,7 +517,7 @@ case.</doc>
       </field>
       <field name="list">
         <type name="GLib.List" c:type="GList*">
-          <type name="any" c:type="gpointer"/>
+          <type name="gpointer" c:type="gpointer"/>
         </type>
       </field>
       <glib:signal name="test">
@@ -545,7 +545,7 @@ case.</doc>
       <field name="matrix">
         <callback name="matrix" c:type="matrix">
           <return-value transfer-ownership="none">
-            <type name="int" c:type="int"/>
+            <type name="gint" c:type="int"/>
           </return-value>
           <parameters>
             <parameter name="obj" transfer-ownership="none">
@@ -559,10 +559,10 @@ case.</doc>
         </callback>
       </field>
       <field name="test_signal">
-        <type name="uint" c:type="guint"/>
+        <type name="guint" c:type="guint"/>
       </field>
       <field name="test_signal_with_static_scope_arg">
-        <type name="uint" c:type="guint"/>
+        <type name="guint" c:type="guint"/>
       </field>
     </record>
     <record name="TestSimpleBoxedA"
@@ -570,13 +570,13 @@ case.</doc>
             glib:type-name="RegressTestSimpleBoxedA"
             glib:get-type="regress_test_simple_boxed_a_get_type">
       <field name="some_int" writable="1">
-        <type name="int" c:type="gint"/>
+        <type name="gint" c:type="gint"/>
       </field>
       <field name="some_int8" writable="1">
-        <type name="int8" c:type="gint8"/>
+        <type name="gint8" c:type="gint8"/>
       </field>
       <field name="some_double" writable="1">
-        <type name="double" c:type="gdouble"/>
+        <type name="gdouble" c:type="gdouble"/>
       </field>
       <field name="some_enum" writable="1">
         <type name="TestEnum" c:type="RegressTestEnum"/>
@@ -588,7 +588,7 @@ case.</doc>
       </method>
       <method name="equals" c:identifier="regress_test_simple_boxed_a_equals">
         <return-value transfer-ownership="none">
-          <type name="boolean" c:type="gboolean"/>
+          <type name="gboolean" c:type="gboolean"/>
         </return-value>
         <parameters>
           <parameter name="other_a" transfer-ownership="none">
@@ -602,7 +602,7 @@ case.</doc>
             glib:type-name="RegressTestSimpleBoxedB"
             glib:get-type="regress_test_simple_boxed_b_get_type">
       <field name="some_int8" writable="1">
-        <type name="int8" c:type="gint8"/>
+        <type name="gint8" c:type="gint8"/>
       </field>
       <field name="nested_a" writable="1">
         <type name="TestSimpleBoxedA" c:type="RegressTestSimpleBoxedA"/>
@@ -620,13 +620,13 @@ case.</doc>
     </callback>
     <record name="TestStructA" c:type="RegressTestStructA">
       <field name="some_int" writable="1">
-        <type name="int" c:type="gint"/>
+        <type name="gint" c:type="gint"/>
       </field>
       <field name="some_int8" writable="1">
-        <type name="int8" c:type="gint8"/>
+        <type name="gint8" c:type="gint8"/>
       </field>
       <field name="some_double" writable="1">
-        <type name="double" c:type="gdouble"/>
+        <type name="gdouble" c:type="gdouble"/>
       </field>
       <field name="some_enum" writable="1">
         <type name="TestEnum" c:type="RegressTestEnum"/>
@@ -649,7 +649,7 @@ case.</doc>
     </record>
     <record name="TestStructB" c:type="RegressTestStructB">
       <field name="some_int8" writable="1">
-        <type name="int8" c:type="gint8"/>
+        <type name="gint8" c:type="gint8"/>
       </field>
       <field name="nested_a" writable="1">
         <type name="TestStructA" c:type="RegressTestStructA"/>
@@ -672,7 +672,7 @@ case.</doc>
     </record>
     <record name="TestStructC" c:type="_RegressTestStructC">
       <field name="another_int" writable="1">
-        <type name="int" c:type="gint"/>
+        <type name="gint" c:type="gint"/>
       </field>
       <field name="obj" writable="1">
         <type name="GObject.Object" c:type="GObject*"/>
@@ -689,15 +689,15 @@ case.</doc>
           <type name="TestSubObj" c:type="RegressTestSubObj*"/>
         </return-value>
       </constructor>
-      <method name="unset_bare" c:identifier="regress_test_sub_obj_unset_bare">
+      <method name="instance_method"
+              c:identifier="regress_test_sub_obj_instance_method">
         <return-value transfer-ownership="none">
-          <type name="none" c:type="void"/>
+          <type name="gint" c:type="int"/>
         </return-value>
       </method>
-      <method name="instance_method"
-              c:identifier="regress_test_sub_obj_instance_method">
+      <method name="unset_bare" c:identifier="regress_test_sub_obj_unset_bare">
         <return-value transfer-ownership="none">
-          <type name="int" c:type="int"/>
+          <type name="none" c:type="void"/>
         </return-value>
       </method>
       <field name="parent_instance">
@@ -725,18 +725,18 @@ case.</doc>
       <function name="static_method"
                 c:identifier="regress_test_wi_802_1x_static_method">
         <return-value transfer-ownership="none">
-          <type name="int" c:type="int"/>
+          <type name="gint" c:type="int"/>
         </return-value>
         <parameters>
           <parameter name="x" transfer-ownership="none">
-            <type name="int" c:type="int"/>
+            <type name="gint" c:type="int"/>
           </parameter>
         </parameters>
       </function>
       <method name="get_testbool"
               c:identifier="regress_test_wi_802_1x_get_testbool">
         <return-value transfer-ownership="none">
-          <type name="boolean" c:type="gboolean"/>
+          <type name="gboolean" c:type="gboolean"/>
         </return-value>
       </method>
       <method name="set_testbool"
@@ -746,18 +746,18 @@ case.</doc>
         </return-value>
         <parameters>
           <parameter name="v" transfer-ownership="none">
-            <type name="boolean" c:type="gboolean"/>
+            <type name="gboolean" c:type="gboolean"/>
           </parameter>
         </parameters>
       </method>
       <property name="testbool" writable="1" transfer-ownership="none">
-        <type name="boolean" c:type="gboolean"/>
+        <type name="gboolean" c:type="gboolean"/>
       </property>
       <field name="parent_instance">
         <type name="GObject.Object" c:type="GObject"/>
       </field>
       <field name="testbool">
-        <type name="boolean" c:type="gboolean"/>
+        <type name="gboolean" c:type="gboolean"/>
       </field>
     </class>
     <record name="TestWi8021xClass"
@@ -774,7 +774,7 @@ case.</doc>
       </return-value>
       <parameters>
         <parameter name="abort_on_error" transfer-ownership="none">
-          <type name="boolean" c:type="gboolean"/>
+          <type name="gboolean" c:type="gboolean"/>
         </parameter>
       </parameters>
     </function>
@@ -782,13 +782,13 @@ case.</doc>
               c:identifier="regress_test_array_fixed_size_int_in">
       <return-value transfer-ownership="none">
         <doc xml:whitespace="preserve">the sum of the items in @ints</doc>
-        <type name="int" c:type="int"/>
+        <type name="gint" c:type="int"/>
       </return-value>
       <parameters>
         <parameter name="ints" transfer-ownership="none">
           <doc xml:whitespace="preserve">a list of 5 integers</doc>
           <array c:type="int*" fixed-size="5">
-            <type name="int"/>
+            <type name="gint"/>
           </array>
         </parameter>
       </parameters>
@@ -805,7 +805,7 @@ case.</doc>
                    transfer-ownership="full">
           <doc xml:whitespace="preserve">a list of 5 integers ranging from 0 to 4</doc>
           <array c:type="int**" fixed-size="5">
-            <type name="int"/>
+            <type name="gint"/>
           </array>
         </parameter>
       </parameters>
@@ -815,23 +815,23 @@ case.</doc>
       <return-value transfer-ownership="full">
         <doc xml:whitespace="preserve">a list of 5 integers ranging from 0 to 4</doc>
         <array c:type="int*" fixed-size="5">
-          <type name="int"/>
+          <type name="gint"/>
         </array>
       </return-value>
     </function>
     <function name="test_array_gint16_in"
               c:identifier="regress_test_array_gint16_in">
       <return-value transfer-ownership="none">
-        <type name="int" c:type="int"/>
+        <type name="gint" c:type="int"/>
       </return-value>
       <parameters>
         <parameter name="n_ints" transfer-ownership="none">
-          <type name="int" c:type="int"/>
+          <type name="gint" c:type="int"/>
         </parameter>
         <parameter name="ints" transfer-ownership="none">
           <doc xml:whitespace="preserve">List of ints</doc>
           <array length="0" c:type="gint16*">
-            <type name="int16"/>
+            <type name="gint16"/>
           </array>
         </parameter>
       </parameters>
@@ -839,16 +839,16 @@ case.</doc>
     <function name="test_array_gint32_in"
               c:identifier="regress_test_array_gint32_in">
       <return-value transfer-ownership="none">
-        <type name="int32" c:type="gint32"/>
+        <type name="gint32" c:type="gint32"/>
       </return-value>
       <parameters>
         <parameter name="n_ints" transfer-ownership="none">
-          <type name="int" c:type="int"/>
+          <type name="gint" c:type="int"/>
         </parameter>
         <parameter name="ints" transfer-ownership="none">
           <doc xml:whitespace="preserve">List of ints</doc>
           <array length="0" c:type="gint32*">
-            <type name="int32"/>
+            <type name="gint32"/>
           </array>
         </parameter>
       </parameters>
@@ -856,16 +856,16 @@ case.</doc>
     <function name="test_array_gint64_in"
               c:identifier="regress_test_array_gint64_in">
       <return-value transfer-ownership="none">
-        <type name="int64" c:type="gint64"/>
+        <type name="gint64" c:type="gint64"/>
       </return-value>
       <parameters>
         <parameter name="n_ints" transfer-ownership="none">
-          <type name="int" c:type="int"/>
+          <type name="gint" c:type="int"/>
         </parameter>
         <parameter name="ints" transfer-ownership="none">
           <doc xml:whitespace="preserve">List of ints</doc>
           <array length="0" c:type="gint64*">
-            <type name="int64"/>
+            <type name="gint64"/>
           </array>
         </parameter>
       </parameters>
@@ -873,16 +873,16 @@ case.</doc>
     <function name="test_array_gint8_in"
               c:identifier="regress_test_array_gint8_in">
       <return-value transfer-ownership="none">
-        <type name="int" c:type="int"/>
+        <type name="gint" c:type="int"/>
       </return-value>
       <parameters>
         <parameter name="n_ints" transfer-ownership="none">
-          <type name="int" c:type="int"/>
+          <type name="gint" c:type="int"/>
         </parameter>
         <parameter name="ints" transfer-ownership="none">
           <doc xml:whitespace="preserve">List of ints</doc>
           <array length="0" c:type="gint8*">
-            <type name="int8"/>
+            <type name="gint8"/>
           </array>
         </parameter>
       </parameters>
@@ -895,7 +895,7 @@ case.</doc>
       </return-value>
       <parameters>
         <parameter name="n_types" transfer-ownership="none">
-          <type name="int" c:type="int"/>
+          <type name="gint" c:type="int"/>
         </parameter>
         <parameter name="types" transfer-ownership="none">
           <doc xml:whitespace="preserve">List of types</doc>
@@ -910,7 +910,7 @@ case.</doc>
       <return-value transfer-ownership="full">
         <doc xml:whitespace="preserve">a new array of integers.</doc>
         <array length="0" c:type="int*">
-          <type name="int"/>
+          <type name="gint"/>
         </array>
       </return-value>
       <parameters>
@@ -919,23 +919,23 @@ case.</doc>
                    caller-allocates="0"
                    transfer-ownership="full">
           <doc xml:whitespace="preserve">length of the returned array.</doc>
-          <type name="int" c:type="int*"/>
+          <type name="gint" c:type="int*"/>
         </parameter>
       </parameters>
     </function>
     <function name="test_array_int_in"
               c:identifier="regress_test_array_int_in">
       <return-value transfer-ownership="none">
-        <type name="int" c:type="int"/>
+        <type name="gint" c:type="int"/>
       </return-value>
       <parameters>
         <parameter name="n_ints" transfer-ownership="none">
-          <type name="int" c:type="int"/>
+          <type name="gint" c:type="int"/>
         </parameter>
         <parameter name="ints" transfer-ownership="none">
           <doc xml:whitespace="preserve">List of ints</doc>
           <array length="0" c:type="int*">
-            <type name="int"/>
+            <type name="gint"/>
           </array>
         </parameter>
       </parameters>
@@ -943,16 +943,16 @@ case.</doc>
     <function name="test_array_int_in_take"
               c:identifier="regress_test_array_int_in_take">
       <return-value transfer-ownership="none">
-        <type name="int" c:type="int"/>
+        <type name="gint" c:type="int"/>
       </return-value>
       <parameters>
         <parameter name="n_ints" transfer-ownership="none">
-          <type name="int" c:type="int"/>
+          <type name="gint" c:type="int"/>
         </parameter>
         <parameter name="ints" transfer-ownership="full">
           <doc xml:whitespace="preserve">List of ints</doc>
           <array length="0" c:type="int*">
-            <type name="int"/>
+            <type name="gint"/>
           </array>
         </parameter>
       </parameters>
@@ -968,7 +968,7 @@ case.</doc>
                    caller-allocates="0"
                    transfer-ownership="full">
           <doc xml:whitespace="preserve">the length of @ints</doc>
-          <type name="int" c:type="int*"/>
+          <type name="gint" c:type="int*"/>
         </parameter>
         <parameter name="ints"
                    direction="inout"
@@ -976,7 +976,7 @@ case.</doc>
                    transfer-ownership="full">
           <doc xml:whitespace="preserve">a list of integers whose items will be increased by 1, except the first that will be dropped</doc>
           <array length="0" c:type="int**">
-            <type name="int"/>
+            <type name="gint"/>
           </array>
         </parameter>
       </parameters>
@@ -986,7 +986,7 @@ case.</doc>
       <return-value transfer-ownership="none">
         <doc xml:whitespace="preserve">a static array of integers.</doc>
         <array length="0" c:type="int*">
-          <type name="int"/>
+          <type name="gint"/>
         </array>
       </return-value>
       <parameters>
@@ -995,7 +995,7 @@ case.</doc>
                    caller-allocates="0"
                    transfer-ownership="full">
           <doc xml:whitespace="preserve">length of the returned array.</doc>
-          <type name="int" c:type="int*"/>
+          <type name="gint" c:type="int*"/>
         </parameter>
       </parameters>
     </function>
@@ -1007,12 +1007,12 @@ case.</doc>
       <parameters>
         <parameter name="arr" transfer-ownership="none" allow-none="1">
           <array length="1" c:type="int*">
-            <type name="int"/>
+            <type name="gint"/>
           </array>
         </parameter>
         <parameter name="len" transfer-ownership="none">
           <doc xml:whitespace="preserve">length</doc>
-          <type name="int" c:type="int"/>
+          <type name="gint" c:type="int"/>
         </parameter>
       </parameters>
     </function>
@@ -1028,7 +1028,7 @@ case.</doc>
                    transfer-ownership="full"
                    allow-none="1">
           <array length="1" c:type="int**">
-            <type name="int"/>
+            <type name="gint"/>
           </array>
         </parameter>
         <parameter name="len"
@@ -1036,7 +1036,7 @@ case.</doc>
                    caller-allocates="0"
                    transfer-ownership="full">
           <doc xml:whitespace="preserve">length</doc>
-          <type name="int" c:type="int*"/>
+          <type name="gint" c:type="int*"/>
         </parameter>
       </parameters>
     </function>
@@ -1051,7 +1051,7 @@ case.</doc>
                    caller-allocates="0"
                    transfer-ownership="full">
           <doc xml:whitespace="preserve">the length of @ints</doc>
-          <type name="int" c:type="int*"/>
+          <type name="gint" c:type="int*"/>
         </parameter>
         <parameter name="ints"
                    direction="out"
@@ -1059,7 +1059,7 @@ case.</doc>
                    transfer-ownership="full">
           <doc xml:whitespace="preserve">a list of 5 integers, from 0 to 4 in consecutive order</doc>
           <array length="0" c:type="int**">
-            <type name="int"/>
+            <type name="gint"/>
           </array>
         </parameter>
       </parameters>
@@ -1077,33 +1077,33 @@ case.</doc>
     </function>
     <function name="test_boolean" c:identifier="regress_test_boolean">
       <return-value transfer-ownership="none">
-        <type name="boolean" c:type="gboolean"/>
+        <type name="gboolean" c:type="gboolean"/>
       </return-value>
       <parameters>
         <parameter name="in" transfer-ownership="none">
-          <type name="boolean" c:type="gboolean"/>
+          <type name="gboolean" c:type="gboolean"/>
         </parameter>
       </parameters>
     </function>
     <function name="test_boolean_false"
               c:identifier="regress_test_boolean_false">
       <return-value transfer-ownership="none">
-        <type name="boolean" c:type="gboolean"/>
+        <type name="gboolean" c:type="gboolean"/>
       </return-value>
       <parameters>
         <parameter name="in" transfer-ownership="none">
-          <type name="boolean" c:type="gboolean"/>
+          <type name="gboolean" c:type="gboolean"/>
         </parameter>
       </parameters>
     </function>
     <function name="test_boolean_true"
               c:identifier="regress_test_boolean_true">
       <return-value transfer-ownership="none">
-        <type name="boolean" c:type="gboolean"/>
+        <type name="gboolean" c:type="gboolean"/>
       </return-value>
       <parameters>
         <parameter name="in" transfer-ownership="none">
-          <type name="boolean" c:type="gboolean"/>
+          <type name="gboolean" c:type="gboolean"/>
         </parameter>
       </parameters>
     </function>
@@ -1163,7 +1163,7 @@ case.</doc>
     </function>
     <function name="test_callback" c:identifier="regress_test_callback">
       <return-value transfer-ownership="none">
-        <type name="int" c:type="int"/>
+        <type name="gint" c:type="int"/>
       </return-value>
       <parameters>
         <parameter name="callback"
@@ -1188,7 +1188,7 @@ case.</doc>
                 c:type="RegressTestCallbackUserData"/>
         </parameter>
         <parameter name="user_data" transfer-ownership="none">
-          <type name="any" c:type="gpointer"/>
+          <type name="gpointer" c:type="gpointer"/>
         </parameter>
       </parameters>
     </function>
@@ -1197,7 +1197,7 @@ case.</doc>
       <doc xml:whitespace="preserve">Notified - callback persists until a DestroyNotify delegate
 is invoked.</doc>
       <return-value transfer-ownership="none">
-        <type name="int" c:type="int"/>
+        <type name="gint" c:type="int"/>
       </return-value>
       <parameters>
         <parameter name="callback"
@@ -1209,7 +1209,7 @@ is invoked.</doc>
                 c:type="RegressTestCallbackUserData"/>
         </parameter>
         <parameter name="user_data" transfer-ownership="none">
-          <type name="any" c:type="gpointer"/>
+          <type name="gpointer" c:type="gpointer"/>
         </parameter>
         <parameter name="notify" transfer-ownership="none" scope="call">
           <type name="GLib.DestroyNotify" c:type="GDestroyNotify"/>
@@ -1219,7 +1219,7 @@ is invoked.</doc>
     <function name="test_callback_thaw_async"
               c:identifier="regress_test_callback_thaw_async">
       <return-value transfer-ownership="none">
-        <type name="int" c:type="int"/>
+        <type name="gint" c:type="int"/>
       </return-value>
     </function>
     <function name="test_callback_thaw_notifications"
@@ -1229,7 +1229,7 @@ adding up their return values, and removes them, invoking the
 corresponding destroy notfications.</doc>
       <return-value transfer-ownership="none">
         <doc xml:whitespace="preserve">Sum of the return values of the invoked callbacks.</doc>
-        <type name="int" c:type="int"/>
+        <type name="gint" c:type="int"/>
       </return-value>
     </function>
     <function name="test_callback_user_data"
@@ -1237,7 +1237,7 @@ corresponding destroy notfications.</doc>
       <doc xml:whitespace="preserve">Call - callback parameter persists for the duration of the method
 call and can be released on return.</doc>
       <return-value transfer-ownership="none">
-        <type name="int" c:type="int"/>
+        <type name="gint" c:type="int"/>
       </return-value>
       <parameters>
         <parameter name="callback"
@@ -1248,13 +1248,13 @@ call and can be released on return.</doc>
                 c:type="RegressTestCallbackUserData"/>
         </parameter>
         <parameter name="user_data" transfer-ownership="none">
-          <type name="any" c:type="gpointer"/>
+          <type name="gpointer" c:type="gpointer"/>
         </parameter>
       </parameters>
     </function>
     <function name="test_closure" c:identifier="regress_test_closure">
       <return-value transfer-ownership="none">
-        <type name="int" c:type="int"/>
+        <type name="gint" c:type="int"/>
       </return-value>
       <parameters>
         <parameter name="closure" transfer-ownership="none">
@@ -1265,14 +1265,14 @@ call and can be released on return.</doc>
     <function name="test_closure_one_arg"
               c:identifier="regress_test_closure_one_arg">
       <return-value transfer-ownership="none">
-        <type name="int" c:type="int"/>
+        <type name="gint" c:type="int"/>
       </return-value>
       <parameters>
         <parameter name="closure" transfer-ownership="none">
           <type name="GObject.Closure" c:type="GClosure*"/>
         </parameter>
         <parameter name="arg" transfer-ownership="none">
-          <type name="int" c:type="int"/>
+          <type name="gint" c:type="int"/>
         </parameter>
       </parameters>
     </function>
@@ -1284,11 +1284,11 @@ call and can be released on return.</doc>
     </function>
     <function name="test_double" c:identifier="regress_test_double">
       <return-value transfer-ownership="none">
-        <type name="double" c:type="gdouble"/>
+        <type name="gdouble" c:type="gdouble"/>
       </return-value>
       <parameters>
         <parameter name="in" transfer-ownership="none">
-          <type name="double" c:type="gdouble"/>
+          <type name="gdouble" c:type="gdouble"/>
         </parameter>
       </parameters>
     </function>
@@ -1313,11 +1313,11 @@ call and can be released on return.</doc>
     </function>
     <function name="test_float" c:identifier="regress_test_float">
       <return-value transfer-ownership="none">
-        <type name="float" c:type="gfloat"/>
+        <type name="gfloat" c:type="gfloat"/>
       </return-value>
       <parameters>
         <parameter name="in" transfer-ownership="none">
-          <type name="float" c:type="gfloat"/>
+          <type name="gfloat" c:type="gfloat"/>
         </parameter>
       </parameters>
     </function>
@@ -1757,51 +1757,51 @@ call and can be released on return.</doc>
     </function>
     <function name="test_int" c:identifier="regress_test_int">
       <return-value transfer-ownership="none">
-        <type name="int" c:type="gint"/>
+        <type name="gint" c:type="gint"/>
       </return-value>
       <parameters>
         <parameter name="in" transfer-ownership="none">
-          <type name="int" c:type="gint"/>
+          <type name="gint" c:type="gint"/>
         </parameter>
       </parameters>
     </function>
     <function name="test_int16" c:identifier="regress_test_int16">
       <return-value transfer-ownership="none">
-        <type name="int16" c:type="gint16"/>
+        <type name="gint16" c:type="gint16"/>
       </return-value>
       <parameters>
         <parameter name="in" transfer-ownership="none">
-          <type name="int16" c:type="gint16"/>
+          <type name="gint16" c:type="gint16"/>
         </parameter>
       </parameters>
     </function>
     <function name="test_int32" c:identifier="regress_test_int32">
       <return-value transfer-ownership="none">
-        <type name="int32" c:type="gint32"/>
+        <type name="gint32" c:type="gint32"/>
       </return-value>
       <parameters>
         <parameter name="in" transfer-ownership="none">
-          <type name="int32" c:type="gint32"/>
+          <type name="gint32" c:type="gint32"/>
         </parameter>
       </parameters>
     </function>
     <function name="test_int64" c:identifier="regress_test_int64">
       <return-value transfer-ownership="none">
-        <type name="int64" c:type="gint64"/>
+        <type name="gint64" c:type="gint64"/>
       </return-value>
       <parameters>
         <parameter name="in" transfer-ownership="none">
-          <type name="int64" c:type="gint64"/>
+          <type name="gint64" c:type="gint64"/>
         </parameter>
       </parameters>
     </function>
     <function name="test_int8" c:identifier="regress_test_int8">
       <return-value transfer-ownership="none">
-        <type name="int8" c:type="gint8"/>
+        <type name="gint8" c:type="gint8"/>
       </return-value>
       <parameters>
         <parameter name="in" transfer-ownership="none">
-          <type name="int8" c:type="gint8"/>
+          <type name="gint8" c:type="gint8"/>
         </parameter>
       </parameters>
     </function>
@@ -1815,7 +1815,7 @@ call and can be released on return.</doc>
                    direction="out"
                    caller-allocates="0"
                    transfer-ownership="full">
-          <type name="int" c:type="int*"/>
+          <type name="gint" c:type="int*"/>
         </parameter>
         <parameter name="in" transfer-ownership="none">
           <type name="utf8" c:type="char*"/>
@@ -1825,7 +1825,7 @@ call and can be released on return.</doc>
     <function name="test_int_value_arg"
               c:identifier="regress_test_int_value_arg">
       <return-value transfer-ownership="none">
-        <type name="int" c:type="int"/>
+        <type name="gint" c:type="int"/>
       </return-value>
       <parameters>
         <parameter name="v" transfer-ownership="none">
@@ -1835,18 +1835,18 @@ call and can be released on return.</doc>
     </function>
     <function name="test_long" c:identifier="regress_test_long">
       <return-value transfer-ownership="none">
-        <type name="long" c:type="glong"/>
+        <type name="glong" c:type="glong"/>
       </return-value>
       <parameters>
         <parameter name="in" transfer-ownership="none">
-          <type name="long" c:type="glong"/>
+          <type name="glong" c:type="glong"/>
         </parameter>
       </parameters>
     </function>
     <function name="test_multi_callback"
               c:identifier="regress_test_multi_callback">
       <return-value transfer-ownership="none">
-        <type name="int" c:type="int"/>
+        <type name="gint" c:type="int"/>
       </return-value>
       <parameters>
         <parameter name="callback"
@@ -1864,29 +1864,29 @@ call and can be released on return.</doc>
       </return-value>
       <parameters>
         <parameter name="in" transfer-ownership="none">
-          <type name="double" c:type="gdouble"/>
+          <type name="gdouble" c:type="gdouble"/>
         </parameter>
         <parameter name="one"
                    direction="out"
                    caller-allocates="0"
                    transfer-ownership="full">
-          <type name="double" c:type="gdouble*"/>
+          <type name="gdouble" c:type="gdouble*"/>
         </parameter>
         <parameter name="two"
                    direction="out"
                    caller-allocates="0"
                    transfer-ownership="full">
-          <type name="double" c:type="gdouble*"/>
+          <type name="gdouble" c:type="gdouble*"/>
         </parameter>
       </parameters>
     </function>
     <function name="test_short" c:identifier="regress_test_short">
       <return-value transfer-ownership="none">
-        <type name="short" c:type="gshort"/>
+        <type name="gshort" c:type="gshort"/>
       </return-value>
       <parameters>
         <parameter name="in" transfer-ownership="none">
-          <type name="short" c:type="gshort"/>
+          <type name="gshort" c:type="gshort"/>
         </parameter>
       </parameters>
     </function>
@@ -1912,27 +1912,27 @@ call and can be released on return.</doc>
     </function>
     <function name="test_size" c:identifier="regress_test_size">
       <return-value transfer-ownership="none">
-        <type name="gsize" c:type="gsize"/>
+        <type name="gulong" c:type="gsize"/>
       </return-value>
       <parameters>
         <parameter name="in" transfer-ownership="none">
-          <type name="gsize" c:type="gsize"/>
+          <type name="gulong" c:type="gsize"/>
         </parameter>
       </parameters>
     </function>
     <function name="test_ssize" c:identifier="regress_test_ssize">
       <return-value transfer-ownership="none">
-        <type name="gssize" c:type="gssize"/>
+        <type name="glong" c:type="gssize"/>
       </return-value>
       <parameters>
         <parameter name="in" transfer-ownership="none">
-          <type name="gssize" c:type="gssize"/>
+          <type name="glong" c:type="gssize"/>
         </parameter>
       </parameters>
     </function>
     <function name="test_strv_in" c:identifier="regress_test_strv_in">
       <return-value transfer-ownership="none">
-        <type name="boolean" c:type="gboolean"/>
+        <type name="gboolean" c:type="gboolean"/>
       </return-value>
       <parameters>
         <parameter name="arr" transfer-ownership="none">
@@ -1945,7 +1945,7 @@ call and can be released on return.</doc>
     <function name="test_strv_in_container"
               c:identifier="regress_test_strv_in_container">
       <return-value transfer-ownership="none">
-        <type name="boolean" c:type="gboolean"/>
+        <type name="gboolean" c:type="gboolean"/>
       </return-value>
       <parameters>
         <parameter name="arr" transfer-ownership="container">
@@ -2002,11 +2002,11 @@ call and can be released on return.</doc>
     </function>
     <function name="test_timet" c:identifier="regress_test_timet">
       <return-value transfer-ownership="none">
-        <type name="long" c:type="time_t"/>
+        <type name="glong" c:type="time_t"/>
       </return-value>
       <parameters>
         <parameter name="in" transfer-ownership="none">
-          <type name="long" c:type="time_t"/>
+          <type name="glong" c:type="time_t"/>
         </parameter>
       </parameters>
     </function>
@@ -2017,19 +2017,19 @@ call and can be released on return.</doc>
       </return-value>
       <parameters>
         <parameter name="x" transfer-ownership="none">
-          <type name="int" c:type="int"/>
+          <type name="gint" c:type="int"/>
         </parameter>
         <parameter name="y"
                    direction="out"
                    caller-allocates="0"
                    transfer-ownership="full">
-          <type name="double" c:type="double*"/>
+          <type name="gdouble" c:type="double*"/>
         </parameter>
         <parameter name="z"
                    direction="out"
                    caller-allocates="0"
                    transfer-ownership="full">
-          <type name="int" c:type="int*"/>
+          <type name="gint" c:type="int*"/>
         </parameter>
         <parameter name="foo" transfer-ownership="none">
           <type name="utf8" c:type="char*"/>
@@ -2038,10 +2038,10 @@ call and can be released on return.</doc>
                    direction="out"
                    caller-allocates="0"
                    transfer-ownership="full">
-          <type name="int" c:type="int*"/>
+          <type name="gint" c:type="int*"/>
         </parameter>
         <parameter name="m" transfer-ownership="none">
-          <type name="uint" c:type="guint"/>
+          <type name="guint" c:type="guint"/>
         </parameter>
       </parameters>
     </function>
@@ -2050,23 +2050,23 @@ call and can be released on return.</doc>
               throws="1">
       <doc xml:whitespace="preserve">This function throws an error if m is odd.</doc>
       <return-value transfer-ownership="none">
-        <type name="boolean" c:type="gboolean"/>
+        <type name="gboolean" c:type="gboolean"/>
       </return-value>
       <parameters>
         <parameter name="x" transfer-ownership="none">
-          <type name="int" c:type="int"/>
+          <type name="gint" c:type="int"/>
         </parameter>
         <parameter name="y"
                    direction="out"
                    caller-allocates="0"
                    transfer-ownership="full">
-          <type name="double" c:type="double*"/>
+          <type name="gdouble" c:type="double*"/>
         </parameter>
         <parameter name="z"
                    direction="out"
                    caller-allocates="0"
                    transfer-ownership="full">
-          <type name="int" c:type="int*"/>
+          <type name="gint" c:type="int*"/>
         </parameter>
         <parameter name="foo" transfer-ownership="none">
           <type name="utf8" c:type="char*"/>
@@ -2075,10 +2075,10 @@ call and can be released on return.</doc>
                    direction="out"
                    caller-allocates="0"
                    transfer-ownership="full">
-          <type name="int" c:type="int*"/>
+          <type name="gint" c:type="int*"/>
         </parameter>
         <parameter name="m" transfer-ownership="none">
-          <type name="uint" c:type="guint"/>
+          <type name="guint" c:type="guint"/>
         </parameter>
       </parameters>
     </function>
@@ -2089,7 +2089,7 @@ call and can be released on return.</doc>
       </return-value>
       <parameters>
         <parameter name="x" transfer-ownership="none">
-          <type name="int" c:type="int"/>
+          <type name="gint" c:type="int"/>
         </parameter>
         <parameter name="callback"
                    transfer-ownership="none"
@@ -2100,7 +2100,7 @@ call and can be released on return.</doc>
                 c:type="RegressTestCallbackUserData"/>
         </parameter>
         <parameter name="user_data" transfer-ownership="none">
-          <type name="any" c:type="gpointer"/>
+          <type name="gpointer" c:type="gpointer"/>
         </parameter>
         <parameter name="notify" transfer-ownership="none" scope="call">
           <type name="GLib.DestroyNotify" c:type="GDestroyNotify"/>
@@ -2109,13 +2109,13 @@ call and can be released on return.</doc>
                    direction="out"
                    caller-allocates="0"
                    transfer-ownership="full">
-          <type name="double" c:type="double*"/>
+          <type name="gdouble" c:type="double*"/>
         </parameter>
         <parameter name="z"
                    direction="out"
                    caller-allocates="0"
                    transfer-ownership="full">
-          <type name="int" c:type="int*"/>
+          <type name="gint" c:type="int*"/>
         </parameter>
         <parameter name="foo" transfer-ownership="none">
           <type name="utf8" c:type="char*"/>
@@ -2124,80 +2124,80 @@ call and can be released on return.</doc>
                    direction="out"
                    caller-allocates="0"
                    transfer-ownership="full">
-          <type name="int" c:type="int*"/>
+          <type name="gint" c:type="int*"/>
         </parameter>
         <parameter name="m" transfer-ownership="none">
-          <type name="uint" c:type="guint"/>
+          <type name="guint" c:type="guint"/>
         </parameter>
       </parameters>
     </function>
     <function name="test_uint" c:identifier="regress_test_uint">
       <return-value transfer-ownership="none">
-        <type name="uint" c:type="guint"/>
+        <type name="guint" c:type="guint"/>
       </return-value>
       <parameters>
         <parameter name="in" transfer-ownership="none">
-          <type name="uint" c:type="guint"/>
+          <type name="guint" c:type="guint"/>
         </parameter>
       </parameters>
     </function>
     <function name="test_uint16" c:identifier="regress_test_uint16">
       <return-value transfer-ownership="none">
-        <type name="uint16" c:type="guint16"/>
+        <type name="guint16" c:type="guint16"/>
       </return-value>
       <parameters>
         <parameter name="in" transfer-ownership="none">
-          <type name="uint16" c:type="guint16"/>
+          <type name="guint16" c:type="guint16"/>
         </parameter>
       </parameters>
     </function>
     <function name="test_uint32" c:identifier="regress_test_uint32">
       <return-value transfer-ownership="none">
-        <type name="uint32" c:type="guint32"/>
+        <type name="guint32" c:type="guint32"/>
       </return-value>
       <parameters>
         <parameter name="in" transfer-ownership="none">
-          <type name="uint32" c:type="guint32"/>
+          <type name="guint32" c:type="guint32"/>
         </parameter>
       </parameters>
     </function>
     <function name="test_uint64" c:identifier="regress_test_uint64">
       <return-value transfer-ownership="none">
-        <type name="uint64" c:type="guint64"/>
+        <type name="guint64" c:type="guint64"/>
       </return-value>
       <parameters>
         <parameter name="in" transfer-ownership="none">
-          <type name="uint64" c:type="guint64"/>
+          <type name="guint64" c:type="guint64"/>
         </parameter>
       </parameters>
     </function>
     <function name="test_uint8" c:identifier="regress_test_uint8">
       <return-value transfer-ownership="none">
-        <type name="uint8" c:type="guint8"/>
+        <type name="guint8" c:type="guint8"/>
       </return-value>
       <parameters>
         <parameter name="in" transfer-ownership="none">
-          <type name="uint8" c:type="guint8"/>
+          <type name="guint8" c:type="guint8"/>
         </parameter>
       </parameters>
     </function>
     <function name="test_ulong" c:identifier="regress_test_ulong">
       <return-value transfer-ownership="none">
-        <type name="ulong" c:type="gulong"/>
+        <type name="gulong" c:type="gulong"/>
       </return-value>
       <parameters>
         <parameter name="in" transfer-ownership="none">
-          <type name="ulong" c:type="gulong"/>
+          <type name="gulong" c:type="gulong"/>
         </parameter>
       </parameters>
     </function>
     <function name="test_ushort" c:identifier="regress_test_ushort">
       <return-value transfer-ownership="none">
-        <type name="ushort" c:type="gushort"/>
+        <type name="gushort" c:type="gushort"/>
       </return-value>
       <parameters>
         <parameter name="in" transfer-ownership="none">
-          <type name="ushort" c:type="gushort"/>
+          <type name="gushort" c:type="gushort"/>
         </parameter>
       </parameters>
     </function>
@@ -2350,7 +2350,7 @@ call and can be released on return.</doc>
       <parameters>
         <parameter name="i" transfer-ownership="none">
           <doc xml:whitespace="preserve">an int</doc>
-          <type name="int" c:type="int"/>
+          <type name="gint" c:type="int"/>
         </parameter>
       </parameters>
     </function>
diff --git a/tests/scanner/TestInherit-1.0-expected.gir b/tests/scanner/TestInherit-1.0-expected.gir
index 3c82fb3..1d8a262 100644
--- a/tests/scanner/TestInherit-1.0-expected.gir
+++ b/tests/scanner/TestInherit-1.0-expected.gir
@@ -27,7 +27,19 @@ and/or use gtk-doc annotations.  -->
         </return-value>
         <parameters>
           <parameter name="x" transfer-ownership="none">
-            <type name="int" c:type="int"/>
+            <type name="gint" c:type="int"/>
+          </parameter>
+        </parameters>
+      </method>
+      <method name="do_foo_maybe_throw"
+              c:identifier="test_inherit_drawable_do_foo_maybe_throw"
+              throws="1">
+        <return-value transfer-ownership="none">
+          <type name="none" c:type="void"/>
+        </return-value>
+        <parameters>
+          <parameter name="x" transfer-ownership="none">
+            <type name="gint" c:type="int"/>
           </parameter>
         </parameters>
       </method>
@@ -41,13 +53,13 @@ and/or use gtk-doc annotations.  -->
                      direction="out"
                      caller-allocates="0"
                      transfer-ownership="full">
-            <type name="int" c:type="int*"/>
+            <type name="gint" c:type="int*"/>
           </parameter>
           <parameter name="y"
                      direction="out"
                      caller-allocates="0"
                      transfer-ownership="full">
-            <type name="int" c:type="int*"/>
+            <type name="gint" c:type="int*"/>
           </parameter>
         </parameters>
       </method>
@@ -60,25 +72,13 @@ and/or use gtk-doc annotations.  -->
                      direction="out"
                      caller-allocates="0"
                      transfer-ownership="full">
-            <type name="uint" c:type="guint*"/>
+            <type name="guint" c:type="guint*"/>
           </parameter>
           <parameter name="height"
                      direction="out"
                      caller-allocates="0"
                      transfer-ownership="full">
-            <type name="uint" c:type="guint*"/>
-          </parameter>
-        </parameters>
-      </method>
-      <method name="do_foo_maybe_throw"
-              c:identifier="test_inherit_drawable_do_foo_maybe_throw"
-              throws="1">
-        <return-value transfer-ownership="none">
-          <type name="none" c:type="void"/>
-        </return-value>
-        <parameters>
-          <parameter name="x" transfer-ownership="none">
-            <type name="int" c:type="int"/>
+            <type name="guint" c:type="guint*"/>
           </parameter>
         </parameters>
       </method>
diff --git a/tests/scanner/Utility-1.0-expected.gir b/tests/scanner/Utility-1.0-expected.gir
index 6bf3744..7fbbed4 100644
--- a/tests/scanner/Utility-1.0-expected.gir
+++ b/tests/scanner/Utility-1.0-expected.gir
@@ -14,26 +14,26 @@ and/or use gtk-doc annotations.  -->
              shared-library="libutility.so"
              c:prefix="Utility">
     <alias name="Glyph" c:type="UtilityGlyph">
-      <type name="uint32"/>
+      <type name="guint32"/>
     </alias>
     <record name="Buffer" c:type="UtilityBuffer">
       <field name="data" writable="1">
-        <type name="any" c:type="char*"/>
+        <type name="GLib.pointer" c:type="char*"/>
       </field>
       <field name="length" writable="1">
-        <type name="gsize" c:type="gsize"/>
+        <type name="gulong" c:type="gsize"/>
       </field>
     </record>
     <union name="Byte" c:type="UtilityByte">
       <field name="value" writable="1">
-        <type name="uint8" c:type="guint8"/>
+        <type name="guint8" c:type="guint8"/>
       </field>
       <record>
         <field name="first_nibble" writable="1" bits="4">
-          <type name="uint8" c:type="guint8"/>
+          <type name="guint8" c:type="guint8"/>
         </field>
         <field name="second_nibble" writable="1" bits="4">
-          <type name="uint8" c:type="guint8"/>
+          <type name="guint8" c:type="guint8"/>
         </field>
       </record>
     </union>
@@ -51,7 +51,7 @@ and/or use gtk-doc annotations.  -->
           <type name="utf8" c:type="char*"/>
         </parameter>
         <parameter name="user_data" transfer-ownership="none" closure="1">
-          <type name="any" c:type="gpointer"/>
+          <type name="gpointer" c:type="gpointer"/>
         </parameter>
       </parameters>
     </callback>
@@ -82,7 +82,7 @@ and/or use gtk-doc annotations.  -->
             <type name="FileFunc" c:type="UtilityFileFunc"/>
           </parameter>
           <parameter name="user_data" transfer-ownership="none">
-            <type name="any" c:type="gpointer"/>
+            <type name="gpointer" c:type="gpointer"/>
           </parameter>
           <parameter name="destroy" transfer-ownership="none" scope="call">
             <type name="GLib.DestroyNotify" c:type="GDestroyNotify"/>
@@ -102,33 +102,33 @@ and/or use gtk-doc annotations.  -->
     </record>
     <record name="Struct" c:type="UtilityStruct">
       <field name="field" writable="1">
-        <type name="int" c:type="int"/>
+        <type name="gint" c:type="int"/>
       </field>
       <field name="bitfield1" writable="1" bits="3">
-        <type name="uint" c:type="guint"/>
+        <type name="guint" c:type="guint"/>
       </field>
       <field name="bitfield2" writable="1" bits="2">
-        <type name="uint" c:type="guint"/>
+        <type name="guint" c:type="guint"/>
       </field>
       <field name="data" writable="1">
         <array zero-terminated="0" c:type="guint8" fixed-size="16">
-          <type name="uint8"/>
+          <type name="guint8"/>
         </array>
       </field>
     </record>
     <record name="TaggedValue" c:type="UtilityTaggedValue">
       <field name="tag" writable="1">
-        <type name="int" c:type="int"/>
+        <type name="gint" c:type="int"/>
       </field>
       <union>
         <field name="v_pointer" writable="1">
-          <type name="any" c:type="gpointer"/>
+          <type name="gpointer" c:type="gpointer"/>
         </field>
         <field name="v_real" writable="1">
-          <type name="double" c:type="double"/>
+          <type name="gdouble" c:type="double"/>
         </field>
         <field name="v_integer" writable="1">
-          <type name="long" c:type="long"/>
+          <type name="glong" c:type="long"/>
         </field>
       </union>
     </record>
@@ -137,10 +137,10 @@ and/or use gtk-doc annotations.  -->
         <type name="utf8" c:type="char*"/>
       </field>
       <field name="integer" writable="1">
-        <type name="long" c:type="glong"/>
+        <type name="glong" c:type="glong"/>
       </field>
       <field name="real" writable="1">
-        <type name="double" c:type="double"/>
+        <type name="gdouble" c:type="double"/>
       </field>
     </union>
     <function name="dir_foreach" c:identifier="utility_dir_foreach">
@@ -158,7 +158,7 @@ and/or use gtk-doc annotations.  -->
           <type name="FileFunc" c:type="UtilityFileFunc"/>
         </parameter>
         <parameter name="user_data" transfer-ownership="none">
-          <type name="any" c:type="gpointer"/>
+          <type name="gpointer" c:type="gpointer"/>
         </parameter>
       </parameters>
     </function>
diff --git a/tests/scanner/annotation.c b/tests/scanner/annotation.c
index 497d1ee..015fd83 100644
--- a/tests/scanner/annotation.c
+++ b/tests/scanner/annotation.c
@@ -520,7 +520,7 @@ annotation_object_set_data2 (AnnotationObject *object,
 /**
  * annotation_object_set_data3:
  * @object: a #AnnotationObject
- * @data: (array length=length) (element-type uint8): The data
+ * @data: (array length=length) (element-type guint8): The data
  * @length: Length of the data
  *
  * Test taking a gchar * with a length, overriding the array element



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