[pygobject/invoke-rewrite] [gi-invoke-ng] code style space fixes



commit 3580cd1c7222022ebeef3476f9e609c8045f12a3
Author: John (J5) Palmieri <johnp redhat com>
Date:   Wed Mar 30 15:53:13 2011 -0400

    [gi-invoke-ng] code style space fixes

 gi/pygi-cache.c     |  420 +++++++++++++++++++-------------------
 gi/pygi-invoke-ng.c |  145 +++++++-------
 gi/pygi-marshal.c   |  565 ++++++++++++++++++++++++++-------------------------
 3 files changed, 566 insertions(+), 564 deletions(-)
---
diff --git a/gi/pygi-cache.c b/gi/pygi-cache.c
index 45945cd..323bda7 100644
--- a/gi/pygi-cache.c
+++ b/gi/pygi-cache.c
@@ -36,85 +36,85 @@ PyGIArgCache * _arg_cache_new_from_type_info (GITypeInfo *type_info,
 
 /* cleanup */
 void
-_pygi_arg_cache_free(PyGIArgCache *cache)
+_pygi_arg_cache_free (PyGIArgCache *cache)
 {
     if (cache == NULL)
         return;
 
     if (cache->type_info != NULL)
-        g_base_info_unref( (GIBaseInfo *)cache->type_info);
+        g_base_info_unref ( (GIBaseInfo *)cache->type_info);
     if (cache->destroy_notify)
-        cache->destroy_notify(cache);
+        cache->destroy_notify (cache);
     else
-        g_slice_free(PyGIArgCache, cache);
+        g_slice_free (PyGIArgCache, cache);
 }
 
 static void
 _interface_cache_free_func (PyGIInterfaceCache *cache)
 {
     if (cache != NULL) {
-        Py_XDECREF(cache->py_type);
+        Py_XDECREF (cache->py_type);
         if (cache->type_name != NULL)
-            g_free(cache->type_name);
+            g_free (cache->type_name);
         if (cache->interface_info != NULL)
-            g_base_info_unref( (GIBaseInfo *)cache->interface_info);
-        g_slice_free(PyGIInterfaceCache, cache);
+            g_base_info_unref ( (GIBaseInfo *)cache->interface_info);
+        g_slice_free (PyGIInterfaceCache, cache);
     }
 }
 
 static void
-_hash_cache_free_func(PyGIHashCache *cache)
+_hash_cache_free_func (PyGIHashCache *cache)
 {
     if (cache != NULL) {
-        _pygi_arg_cache_free(cache->key_cache);
-        _pygi_arg_cache_free(cache->value_cache);
-        g_slice_free(PyGIHashCache, cache);
+        _pygi_arg_cache_free (cache->key_cache);
+        _pygi_arg_cache_free (cache->value_cache);
+        g_slice_free (PyGIHashCache, cache);
     }
 }
 
 static void
-_sequence_cache_free_func(PyGISequenceCache *cache)
+_sequence_cache_free_func (PyGISequenceCache *cache)
 {
     if (cache != NULL) {
-        _pygi_arg_cache_free(cache->item_cache);
-        g_slice_free(PyGISequenceCache, cache);
+        _pygi_arg_cache_free (cache->item_cache);
+        g_slice_free (PyGISequenceCache, cache);
     }
 }
 
 static void
-_callback_cache_free_func(PyGICallbackCache *cache)
+_callback_cache_free_func (PyGICallbackCache *cache)
 {
     if (cache != NULL) {
         if (cache->interface_info != NULL)
-            g_base_info_unref( (GIBaseInfo *)cache->interface_info);
+            g_base_info_unref ( (GIBaseInfo *)cache->interface_info);
 
-        g_slice_free(PyGICallbackCache, cache);
+        g_slice_free (PyGICallbackCache, cache);
     }
 }
 
 void
-_pygi_callable_cache_free(PyGICallableCache *cache)
+_pygi_callable_cache_free (PyGICallableCache *cache)
 {
     int i;
 
     if (cache == NULL)
         return;
 
-    g_slist_free(cache->out_args);
+    g_slist_free (cache->out_args);
     for (i = 0; i < cache->n_args; i++) {
         PyGIArgCache *tmp = cache->args_cache[i];
-        _pygi_arg_cache_free(tmp);
+        _pygi_arg_cache_free (tmp);
     }
     if (cache->return_cache != NULL)
-        _pygi_arg_cache_free(cache->return_cache);
+        _pygi_arg_cache_free (cache->return_cache);
 
-    g_slice_free1(cache->n_args * sizeof(PyGIArgCache *), cache->args_cache);
-    g_slice_free(PyGICallableCache, cache);
+    g_slice_free1 (cache->n_args * sizeof (PyGIArgCache *), cache->args_cache);
+    g_slice_free (PyGICallableCache, cache);
 }
 
 /* cache generation */
 static inline PyGICallableCache *
-_callable_cache_new_from_callable_info(GICallableInfo *callable_info)
+_callable_cache_new_from_callable_info (GICallableInfo *callable_info)
 {
     PyGICallableCache *cache;
 
@@ -135,18 +135,18 @@ _callable_cache_new_from_callable_info(GICallableInfo *callable_info)
 
     cache->n_args = g_callable_info_get_n_args (callable_info) + (cache->is_method ? 1: 0);
     if (cache->n_args > 0)
-        cache->args_cache = g_slice_alloc0 (cache->n_args * sizeof(PyGIArgCache *));
+        cache->args_cache = g_slice_alloc0 (cache->n_args * sizeof (PyGIArgCache *));
 
     return cache;
 }
 
 static inline PyGIInterfaceCache *
-_interface_cache_new_from_interface_info(GIInterfaceInfo *iface_info)
+_interface_cache_new_from_interface_info (GIInterfaceInfo *iface_info)
 {
     PyGIInterfaceCache *ic;
 
-    ic = g_slice_new0(PyGIInterfaceCache);
-    ((PyGIArgCache *)ic)->destroy_notify = (GDestroyNotify)_interface_cache_free_func;
+    ic = g_slice_new0 (PyGIInterfaceCache);
+    ( (PyGIArgCache *)ic)->destroy_notify = (GDestroyNotify)_interface_cache_free_func;
     ic->g_type = g_registered_type_info_get_g_type ( (GIRegisteredTypeInfo *)iface_info);
     if (ic->g_type != G_TYPE_NONE) {
         ic->py_type = _pygi_type_get_from_g_type (ic->g_type);
@@ -158,29 +158,29 @@ _interface_cache_new_from_interface_info(GIInterfaceInfo *iface_info)
     if (ic->py_type == NULL)
         return NULL;
 
-    ic->type_name = _pygi_g_base_info_get_fullname(iface_info);
+    ic->type_name = _pygi_g_base_info_get_fullname (iface_info);
     return ic;
 }
 
 static inline PyGISequenceCache *
-_sequence_cache_new_from_type_info(GITypeInfo *type_info,
-                                   GIDirection direction,
-                                   GITransfer transfer,
-                                   gint aux_offset)
+_sequence_cache_new_from_type_info (GITypeInfo *type_info,
+                                    GIDirection direction,
+                                    GITransfer transfer,
+                                    gint aux_offset)
 {
     PyGISequenceCache *sc;
     GITypeInfo *item_type_info;
     GITypeTag item_type_tag;
     GITransfer item_transfer;
 
-    sc = g_slice_new0(PyGISequenceCache);
-    ((PyGIArgCache *)sc)->destroy_notify = (GDestroyNotify)_sequence_cache_free_func;
+    sc = g_slice_new0 (PyGISequenceCache);
+    ( (PyGIArgCache *)sc)->destroy_notify = (GDestroyNotify)_sequence_cache_free_func;
 
     sc->fixed_size = -1;
     sc->len_arg_index = -1;
-    sc->is_zero_terminated = g_type_info_is_zero_terminated(type_info);
+    sc->is_zero_terminated = g_type_info_is_zero_terminated (type_info);
     if (!sc->is_zero_terminated) {
-        sc->fixed_size = g_type_info_get_array_fixed_size(type_info);
+        sc->fixed_size = g_type_info_get_array_fixed_size (type_info);
         if (sc->fixed_size < 0)
             sc->len_arg_index = g_type_info_get_array_length (type_info) + aux_offset;
     }
@@ -191,29 +191,29 @@ _sequence_cache_new_from_type_info(GITypeInfo *type_info,
     item_transfer =
         transfer == GI_TRANSFER_CONTAINER ? GI_TRANSFER_NOTHING : transfer;
 
-    sc->item_cache = _arg_cache_new_from_type_info(item_type_info,
-                                                   NULL,
-                                                   NULL,
-                                                   item_type_tag,
-                                                   item_transfer,
-                                                   direction,
-                                                   0, 0);
+    sc->item_cache = _arg_cache_new_from_type_info (item_type_info,
+                                                    NULL,
+                                                    NULL,
+                                                    item_type_tag,
+                                                    item_transfer,
+                                                    direction,
+                                                    0, 0);
 
     if (sc->item_cache == NULL) {
-        _pygi_arg_cache_free((PyGIArgCache *)sc);
+        _pygi_arg_cache_free ( (PyGIArgCache *)sc);
         return NULL;
     }
 
     sc->item_cache->type_tag = item_type_tag;
-    sc->item_size = _pygi_g_type_info_size(item_type_info);
-    g_base_info_unref( (GIBaseInfo *) item_type_info);
+    sc->item_size = _pygi_g_type_info_size (item_type_info);
+    g_base_info_unref ( (GIBaseInfo *)item_type_info);
 
     return sc;
 }
 static inline PyGIHashCache *
-_hash_cache_new_from_type_info(GITypeInfo *type_info,
-                               GIDirection direction,
-                               GITransfer transfer)
+_hash_cache_new_from_type_info (GITypeInfo *type_info,
+                                GIDirection direction,
+                                GITransfer transfer)
 {
     PyGIHashCache *hc;
     GITypeInfo *key_type_info;
@@ -222,8 +222,8 @@ _hash_cache_new_from_type_info(GITypeInfo *type_info,
     GITypeTag value_type_tag;
     GITransfer item_transfer;
 
-    hc = g_slice_new0(PyGIHashCache);
-    ((PyGIArgCache *)hc)->destroy_notify = (GDestroyNotify)_hash_cache_free_func;
+    hc = g_slice_new0 (PyGIHashCache);
+    ( (PyGIArgCache *)hc)->destroy_notify = (GDestroyNotify)_hash_cache_free_func;
     key_type_info = g_type_info_get_param_type (type_info, 0);
     key_type_tag = g_type_info_get_tag (key_type_info);
     value_type_info = g_type_info_get_param_type (type_info, 1);
@@ -232,29 +232,29 @@ _hash_cache_new_from_type_info(GITypeInfo *type_info,
     item_transfer =
         transfer == GI_TRANSFER_CONTAINER ? GI_TRANSFER_NOTHING : transfer;
 
-    hc->key_cache = _arg_cache_new_from_type_info(key_type_info,
-                                                  NULL,
-                                                  NULL,
-                                                  key_type_tag,
-                                                  item_transfer,
-                                                  direction,
-                                                  0, 0);
+    hc->key_cache = _arg_cache_new_from_type_info (key_type_info,
+                                                   NULL,
+                                                   NULL,
+                                                   key_type_tag,
+                                                   item_transfer,
+                                                   direction,
+                                                   0, 0);
 
     if (hc->key_cache == NULL) {
-        _pygi_arg_cache_free((PyGIArgCache *)hc);
+        _pygi_arg_cache_free ( (PyGIArgCache *)hc);
         return NULL;
     }
 
-    hc->value_cache = _arg_cache_new_from_type_info(value_type_info,
-                                                    NULL,
-                                                    NULL,
-                                                    value_type_tag,
-                                                    item_transfer,
-                                                    direction,
-                                                    0, 0);
+    hc->value_cache = _arg_cache_new_from_type_info (value_type_info,
+                                                     NULL,
+                                                     NULL,
+                                                     value_type_tag,
+                                                     item_transfer,
+                                                     direction,
+                                                     0, 0);
 
     if (hc->value_cache == NULL) {
-        _pygi_arg_cache_free((PyGIArgCache *)hc);
+        _pygi_arg_cache_free ( (PyGIArgCache *)hc);
         return NULL;
     }
 
@@ -268,223 +268,223 @@ _hash_cache_new_from_type_info(GITypeInfo *type_info,
 }
 
 static inline PyGICallbackCache *
-_callback_cache_new_from_arg_info(GIArgInfo *arg_info,
-                                  GIInterfaceInfo *iface_info,
-                                  gint aux_offset)
+_callback_cache_new_from_arg_info (GIArgInfo *arg_info,
+                                   GIInterfaceInfo *iface_info,
+                                   gint aux_offset)
 {
    PyGICallbackCache *cc;
 
-   cc = g_slice_new0(PyGICallbackCache);
-   cc->user_data_index = g_arg_info_get_closure(arg_info);
+   cc = g_slice_new0 (PyGICallbackCache);
+   cc->user_data_index = g_arg_info_get_closure (arg_info);
    if (cc->user_data_index != -1)
        cc->user_data_index += aux_offset;
-   cc->destroy_notify_index = g_arg_info_get_destroy(arg_info);
+   cc->destroy_notify_index = g_arg_info_get_destroy (arg_info);
    if (cc->destroy_notify_index != -1)
        cc->destroy_notify_index += aux_offset;
-   cc->scope = g_arg_info_get_scope(arg_info);
+   cc->scope = g_arg_info_get_scope (arg_info);
    g_base_info_ref( (GIBaseInfo *)iface_info);
    cc->interface_info = iface_info;
    return cc;
 }
 
 static inline PyGIArgCache *
-_arg_cache_new(void)
+_arg_cache_new (void)
 {
-    return g_slice_new0(PyGIArgCache);
+    return g_slice_new0 (PyGIArgCache);
 }
 
 static inline void
-_arg_cache_in_void_setup(PyGIArgCache *arg_cache)
+_arg_cache_in_void_setup (PyGIArgCache *arg_cache)
 {
     arg_cache->in_marshaller = _pygi_marshal_in_void;
 }
 
 static inline void
-_arg_cache_out_void_setup(PyGIArgCache *arg_cache)
+_arg_cache_out_void_setup (PyGIArgCache *arg_cache)
 {
     arg_cache->out_marshaller = _pygi_marshal_out_void;
 }
 
 static inline void
-_arg_cache_in_boolean_setup(PyGIArgCache *arg_cache)
+_arg_cache_in_boolean_setup (PyGIArgCache *arg_cache)
 {
     arg_cache->in_marshaller = _pygi_marshal_in_boolean;
 }
 
 static inline void
-_arg_cache_out_boolean_setup(PyGIArgCache *arg_cache)
+_arg_cache_out_boolean_setup (PyGIArgCache *arg_cache)
 {
     arg_cache->out_marshaller = _pygi_marshal_out_boolean;
 }
 
 static inline void
-_arg_cache_in_int8_setup(PyGIArgCache *arg_cache)
+_arg_cache_in_int8_setup (PyGIArgCache *arg_cache)
 {
     arg_cache->in_marshaller = _pygi_marshal_in_int8;
 }
 
 static inline void
-_arg_cache_out_int8_setup(PyGIArgCache *arg_cache)
+_arg_cache_out_int8_setup (PyGIArgCache *arg_cache)
 {
     arg_cache->out_marshaller = _pygi_marshal_out_int8;
 }
 
 static inline void
-_arg_cache_in_uint8_setup(PyGIArgCache *arg_cache)
+_arg_cache_in_uint8_setup (PyGIArgCache *arg_cache)
 {
     arg_cache->in_marshaller = _pygi_marshal_in_uint8;
 }
 
 static inline void
-_arg_cache_out_uint8_setup(PyGIArgCache *arg_cache)
+_arg_cache_out_uint8_setup (PyGIArgCache *arg_cache)
 {
     arg_cache->out_marshaller = _pygi_marshal_out_uint8;
 }
 
 static inline void
-_arg_cache_in_int16_setup(PyGIArgCache *arg_cache)
+_arg_cache_in_int16_setup (PyGIArgCache *arg_cache)
 {
     arg_cache->in_marshaller = _pygi_marshal_in_int16;
 }
 
 static inline void
-_arg_cache_out_int16_setup(PyGIArgCache *arg_cache)
+_arg_cache_out_int16_setup (PyGIArgCache *arg_cache)
 {
     arg_cache->out_marshaller = _pygi_marshal_out_int16;
 }
 
 static inline void
-_arg_cache_in_uint16_setup(PyGIArgCache *arg_cache)
+_arg_cache_in_uint16_setup (PyGIArgCache *arg_cache)
 {
     arg_cache->in_marshaller = _pygi_marshal_in_uint16;
 }
 
 static inline void
-_arg_cache_out_uint16_setup(PyGIArgCache *arg_cache)
+_arg_cache_out_uint16_setup (PyGIArgCache *arg_cache)
 {
     arg_cache->out_marshaller = _pygi_marshal_out_uint16;
 }
 
 static inline void
-_arg_cache_in_int32_setup(PyGIArgCache *arg_cache)
+_arg_cache_in_int32_setup (PyGIArgCache *arg_cache)
 {
     arg_cache->in_marshaller = _pygi_marshal_in_int32;
 }
 
 static inline void
-_arg_cache_out_int32_setup(PyGIArgCache *arg_cache)
+_arg_cache_out_int32_setup (PyGIArgCache *arg_cache)
 {
     arg_cache->out_marshaller = _pygi_marshal_out_int32;
 }
 
 static inline void
-_arg_cache_in_uint32_setup(PyGIArgCache *arg_cache)
+_arg_cache_in_uint32_setup (PyGIArgCache *arg_cache)
 {
     arg_cache->in_marshaller = _pygi_marshal_in_uint32;
 }
 
 static inline void
-_arg_cache_out_uint32_setup(PyGIArgCache *arg_cache)
+_arg_cache_out_uint32_setup (PyGIArgCache *arg_cache)
 {
     arg_cache->out_marshaller = _pygi_marshal_out_uint32;
 }
 
 static inline void
-_arg_cache_in_int64_setup(PyGIArgCache *arg_cache)
+_arg_cache_in_int64_setup (PyGIArgCache *arg_cache)
 {
     arg_cache->in_marshaller = _pygi_marshal_in_int64;
 }
 
 static inline void
-_arg_cache_out_int64_setup(PyGIArgCache *arg_cache)
+_arg_cache_out_int64_setup (PyGIArgCache *arg_cache)
 {
     arg_cache->out_marshaller = _pygi_marshal_out_int64;
 }
 
 static inline void
-_arg_cache_in_uint64_setup(PyGIArgCache *arg_cache)
+_arg_cache_in_uint64_setup (PyGIArgCache *arg_cache)
 {
     arg_cache->in_marshaller = _pygi_marshal_in_uint64;
 }
 
 static inline void
-_arg_cache_out_uint64_setup(PyGIArgCache *arg_cache)
+_arg_cache_out_uint64_setup (PyGIArgCache *arg_cache)
 {
     arg_cache->out_marshaller = _pygi_marshal_out_uint64;
 }
 
 static inline void
-_arg_cache_in_float_setup(PyGIArgCache *arg_cache)
+_arg_cache_in_float_setup (PyGIArgCache *arg_cache)
 {
     arg_cache->in_marshaller = _pygi_marshal_in_float;
 }
 
 static inline void
-_arg_cache_out_float_setup(PyGIArgCache *arg_cache)
+_arg_cache_out_float_setup (PyGIArgCache *arg_cache)
 {
     arg_cache->out_marshaller = _pygi_marshal_out_float;
 }
 
 static inline void
-_arg_cache_in_double_setup(PyGIArgCache *arg_cache)
+_arg_cache_in_double_setup (PyGIArgCache *arg_cache)
 {
     arg_cache->in_marshaller = _pygi_marshal_in_double;
 }
 
 static inline void
-_arg_cache_out_double_setup(PyGIArgCache *arg_cache)
+_arg_cache_out_double_setup (PyGIArgCache *arg_cache)
 {
     arg_cache->out_marshaller = _pygi_marshal_out_double;
 }
 
 static inline void
-_arg_cache_in_unichar_setup(PyGIArgCache *arg_cache)
+_arg_cache_in_unichar_setup (PyGIArgCache *arg_cache)
 {
     arg_cache->in_marshaller = _pygi_marshal_in_unichar;
 }
 
 static inline void
-_arg_cache_out_unichar_setup(PyGIArgCache *arg_cache)
+_arg_cache_out_unichar_setup (PyGIArgCache *arg_cache)
 {
     arg_cache->out_marshaller = _pygi_marshal_out_unichar;
 }
 
 static inline void
-_arg_cache_in_gtype_setup(PyGIArgCache *arg_cache)
+_arg_cache_in_gtype_setup (PyGIArgCache *arg_cache)
 {
     arg_cache->in_marshaller = _pygi_marshal_in_gtype;
 }
 
 static inline void
-_arg_cache_out_gtype_setup(PyGIArgCache *arg_cache)
+_arg_cache_out_gtype_setup (PyGIArgCache *arg_cache)
 {
     arg_cache->out_marshaller = _pygi_marshal_out_gtype;
 }
 
 static inline void
-_arg_cache_in_utf8_setup(PyGIArgCache *arg_cache,
-                         GITransfer transfer)
+_arg_cache_in_utf8_setup (PyGIArgCache *arg_cache,
+                          GITransfer transfer)
 {
     arg_cache->in_marshaller = _pygi_marshal_in_utf8;
 }
 
 static inline void
-_arg_cache_out_utf8_setup(PyGIArgCache *arg_cache,
-                          GITransfer transfer)
+_arg_cache_out_utf8_setup (PyGIArgCache *arg_cache,
+                           GITransfer transfer)
 {
     arg_cache->out_marshaller = _pygi_marshal_out_utf8;
 }
 
 static inline void
-_arg_cache_in_filename_setup(PyGIArgCache *arg_cache,
-                             GITransfer transfer)
+_arg_cache_in_filename_setup (PyGIArgCache *arg_cache,
+                              GITransfer transfer)
 {
     arg_cache->in_marshaller = _pygi_marshal_in_filename;
 }
 
 static inline void
-_arg_cache_out_filename_setup(PyGIArgCache *arg_cache,
-                              GITransfer transfer)
+_arg_cache_out_filename_setup (PyGIArgCache *arg_cache,
+                               GITransfer transfer)
 {
     arg_cache->out_marshaller = _pygi_marshal_out_filename;
 }
@@ -540,7 +540,7 @@ _arg_cache_out_array_setup (PyGIArgCache *arg_cache,
 
     if (seq_cache->len_arg_index >= 0) {
         PyGIArgCache *aux_cache = callable_cache->args_cache[seq_cache->len_arg_index];
-        if (seq_cache->len_arg_index < arg_index)
+        if (seq_cache->len_argindex < arg_index)
              callable_cache->n_out_aux_args++;
 
         if (aux_cache != NULL) {
@@ -550,7 +550,7 @@ _arg_cache_out_array_setup (PyGIArgCache *arg_cache,
             callable_cache->out_args = 
                 g_slist_remove (callable_cache->out_args, aux_cache);
         } else {
-            aux_cache = _arg_cache_new();
+            aux_cache = _arg_cache_new ();
         }
 
         aux_cache->aux_type = PYGI_AUX_TYPE_IGNORE;
@@ -639,7 +639,7 @@ _arg_cache_out_interface_union_setup (PyGIArgCache *arg_cache,
 
 static void
 _g_slice_free_gvalue_func (GValue *value) {
-    g_slice_free(GValue, value);
+    g_slice_free (GValue, value);
 }
 
 static inline void
@@ -648,7 +648,7 @@ _arg_cache_in_interface_struct_setup (PyGIArgCache *arg_cache,
                                       GITransfer transfer)
 {
     PyGIInterfaceCache *iface_cache = (PyGIInterfaceCache *)arg_cache;
-    iface_cache->is_foreign = g_struct_info_is_foreign( (GIStructInfo*)iface_info);
+    iface_cache->is_foreign = g_struct_info_is_foreign ( (GIStructInfo*)iface_info);
     arg_cache->in_marshaller = _pygi_marshal_in_interface_struct;
     if (iface_cache->g_type == G_TYPE_VALUE)
         arg_cache->cleanup = _g_slice_free_gvalue_func;
@@ -662,7 +662,7 @@ _arg_cache_out_interface_struct_setup (PyGIArgCache *arg_cache,
                                        GITransfer transfer)
 {
     PyGIInterfaceCache *iface_cache = (PyGIInterfaceCache *)arg_cache;
-    iface_cache->is_foreign = g_struct_info_is_foreign( (GIStructInfo*)iface_info);
+    iface_cache->is_foreign = g_struct_info_is_foreign ( (GIStructInfo*)iface_info);
     arg_cache->out_marshaller = _pygi_marshal_out_interface_struct;
 }
 
@@ -753,7 +753,7 @@ _arg_cache_new_from_interface_info (GIInterfaceInfo *iface_info,
 
     /* Callbacks are special cased */
     if (info_type != GI_INFO_TYPE_CALLBACK) {
-        iface_cache = _interface_cache_new_from_interface_info(iface_info);
+        iface_cache = _interface_cache_new_from_interface_info (iface_info);
 
         arg_cache = (PyGIArgCache *)iface_cache;
         if (arg_cache == NULL)
@@ -763,43 +763,43 @@ _arg_cache_new_from_interface_info (GIInterfaceInfo *iface_info,
     switch (info_type) {
         case GI_INFO_TYPE_UNION:
             if (direction == GI_DIRECTION_IN || direction == GI_DIRECTION_INOUT)
-               _arg_cache_in_interface_union_setup(arg_cache, transfer);
+               _arg_cache_in_interface_union_setup (arg_cache, transfer);
 
             if (direction == GI_DIRECTION_OUT || direction == GI_DIRECTION_INOUT)
-               _arg_cache_out_interface_union_setup(arg_cache, transfer);
+               _arg_cache_out_interface_union_setup (arg_cache, transfer);
 
             break;
         case GI_INFO_TYPE_STRUCT:
             if (direction == GI_DIRECTION_IN || direction == GI_DIRECTION_INOUT)
-               _arg_cache_in_interface_struct_setup(arg_cache,
-                                                    iface_info,
-                                                    transfer);
-
-            if (direction == GI_DIRECTION_OUT || direction == GI_DIRECTION_INOUT)
-               _arg_cache_out_interface_struct_setup(arg_cache,
+               _arg_cache_in_interface_struct_setup (arg_cache,
                                                      iface_info,
                                                      transfer);
 
+            if (direction == GI_DIRECTION_OUT || direction == GI_DIRECTION_INOUT)
+               _arg_cache_out_interface_struct_setup (arg_cache,
+                                                      iface_info,
+                                                      transfer);
+
             break;
         case GI_INFO_TYPE_OBJECT:
         case GI_INFO_TYPE_INTERFACE:
             if (direction == GI_DIRECTION_IN || direction == GI_DIRECTION_INOUT)
-               _arg_cache_in_interface_object_setup(arg_cache, transfer);
+               _arg_cache_in_interface_object_setup (arg_cache, transfer);
 
             if (direction == GI_DIRECTION_OUT || direction == GI_DIRECTION_INOUT)
-               _arg_cache_out_interface_object_setup(arg_cache, transfer);
+               _arg_cache_out_interface_object_setup (arg_cache, transfer);
 
             break;
         case GI_INFO_TYPE_BOXED:
             if (direction == GI_DIRECTION_IN || direction == GI_DIRECTION_INOUT)
                 _arg_cache_in_interface_struct_setup (arg_cache,
-                                                                                  iface_info,
-                                                                                  transfer);
+                                                      iface_info,
+                                                      transfer);
 
             if (direction == GI_DIRECTION_OUT || direction == GI_DIRECTION_INOUT)
                 _arg_cache_out_interface_struct_setup (arg_cache,
-                                                                                     iface_info,
-                                                                                     transfer);
+                                                       iface_info,
+                                                       transfer);
 
             break;
         case GI_INFO_TYPE_CALLBACK:
@@ -807,42 +807,42 @@ _arg_cache_new_from_interface_info (GIInterfaceInfo *iface_info,
                 PyGICallbackCache *callback_cache;
 
                 if (direction == GI_DIRECTION_OUT || direction == GI_DIRECTION_INOUT) {
-                    _arg_cache_out_interface_callback_setup();
+                    _arg_cache_out_interface_callback_setup ();
                     return NULL;
                 }
 
                 callback_cache =
-                    _callback_cache_new_from_arg_info(arg_info,
-                                                      iface_info,
-                                                      callable_cache->is_method ? 1: 0);
+                    _callback_cache_new_from_arg_info (arg_info,
+                                                       iface_info,
+                                                       callable_cache->is_method ? 1: 0);
 
                 arg_cache = (PyGIArgCache *)callback_cache;
                 if (arg_cache == NULL)
                     return NULL;
 
                 if (direction == GI_DIRECTION_IN || direction == GI_DIRECTION_INOUT)
-                    _arg_cache_in_interface_callback_setup(arg_cache, callable_cache);
+                    _arg_cache_in_interface_callback_setup (arg_cache, callable_cache);
 
                 break;
             }
         case GI_INFO_TYPE_ENUM:
             if (direction == GI_DIRECTION_IN || direction == GI_DIRECTION_INOUT)
-               _arg_cache_in_interface_enum_setup(arg_cache, transfer);
+               _arg_cache_in_interface_enum_setup (arg_cache, transfer);
 
             if (direction == GI_DIRECTION_OUT || direction == GI_DIRECTION_INOUT)
-               _arg_cache_out_interface_enum_setup(arg_cache, transfer);
+               _arg_cache_out_interface_enum_setup (arg_cache, transfer);
 
             break;
         case GI_INFO_TYPE_FLAGS:
             if (direction == GI_DIRECTION_IN || direction == GI_DIRECTION_INOUT)
-               _arg_cache_in_interface_flags_setup(arg_cache, transfer);
+               _arg_cache_in_interface_flags_setup (arg_cache, transfer);
 
             if (direction == GI_DIRECTION_OUT || direction == GI_DIRECTION_INOUT)
-               _arg_cache_out_interface_flags_setup(arg_cache, transfer);
+               _arg_cache_out_interface_flags_setup (arg_cache, transfer);
 
             break;
         default:
-            g_assert_not_reached();
+            g_assert_not_reached ();
     }
 
     if (arg_cache != NULL) {
@@ -853,7 +853,7 @@ _arg_cache_new_from_interface_info (GIInterfaceInfo *iface_info,
         arg_cache->c_arg_index = c_arg_index;
 
         if (iface_cache != NULL) {
-            g_base_info_ref( (GIBaseInfo *)iface_info);
+            g_base_info_ref ( (GIBaseInfo *)iface_info);
             iface_cache->interface_info = iface_info;
         }
     }
@@ -875,194 +875,194 @@ _arg_cache_new_from_type_info (GITypeInfo *type_info,
 
     switch (type_tag) {
        case GI_TYPE_TAG_VOID:
-           arg_cache = _arg_cache_new();
+           arg_cache = _arg_cache_new ();
            if (arg_cache == NULL)
                break;
 
            if (direction == GI_DIRECTION_IN || direction == GI_DIRECTION_INOUT)
-               _arg_cache_in_void_setup(arg_cache);
+               _arg_cache_in_void_setup (arg_cache);
 
            if (direction == GI_DIRECTION_OUT || direction == GI_DIRECTION_INOUT)
-               _arg_cache_out_void_setup(arg_cache);
+               _arg_cache_out_void_setup (arg_cache);
            break;
        case GI_TYPE_TAG_BOOLEAN:
-           arg_cache = _arg_cache_new();
+           arg_cache = _arg_cache_new ();
            if (arg_cache == NULL)
                break;
 
            if (direction == GI_DIRECTION_IN || direction == GI_DIRECTION_INOUT)
-               _arg_cache_in_boolean_setup(arg_cache);
+               _arg_cache_in_boolean_setup (arg_cache);
 
            if (direction == GI_DIRECTION_OUT || direction == GI_DIRECTION_INOUT)
-               _arg_cache_out_boolean_setup(arg_cache);
+               _arg_cache_out_boolean_setup (arg_cache);
 
            break;
        case GI_TYPE_TAG_INT8:
-           arg_cache = _arg_cache_new();
+           arg_cache = _arg_cache_new ();
            if (arg_cache == NULL)
                break;
 
            if (direction == GI_DIRECTION_IN || direction == GI_DIRECTION_INOUT)
-               _arg_cache_in_int8_setup(arg_cache);
+               _arg_cache_in_int8_setup (arg_cache);
 
            if (direction == GI_DIRECTION_OUT || direction == GI_DIRECTION_INOUT)
-               _arg_cache_out_int8_setup(arg_cache);
+               _arg_cache_out_int8_setup (arg_cache);
 
            break;
        case GI_TYPE_TAG_UINT8:
-           arg_cache = _arg_cache_new();
+           arg_cache = _arg_cache_new ();
            if (arg_cache == NULL)
                break;
 
            if (direction == GI_DIRECTION_IN || direction == GI_DIRECTION_INOUT)
-               _arg_cache_in_uint8_setup(arg_cache);
+               _arg_cache_in_uint8_setup (arg_cache);
 
            if (direction == GI_DIRECTION_OUT || direction == GI_DIRECTION_INOUT)
-               _arg_cache_out_uint8_setup(arg_cache);
+               _arg_cache_out_uint8_setup (arg_cache);
 
            break;
        case GI_TYPE_TAG_INT16:
-           arg_cache = _arg_cache_new();
+           arg_cache = _arg_cache_new ();
            if (arg_cache == NULL)
                break;
 
            if (direction == GI_DIRECTION_IN || direction == GI_DIRECTION_INOUT)
-               _arg_cache_in_int16_setup(arg_cache);
+               _arg_cache_in_int16_setup (arg_cache);
 
            if (direction == GI_DIRECTION_OUT || direction == GI_DIRECTION_INOUT)
-               _arg_cache_out_int16_setup(arg_cache);
+               _arg_cache_out_int16_setup (arg_cache);
 
            break;
        case GI_TYPE_TAG_UINT16:
-           arg_cache = _arg_cache_new();
+           arg_cache = _arg_cache_new ();
            if (arg_cache == NULL)
                break;
 
            if (direction == GI_DIRECTION_IN || direction == GI_DIRECTION_INOUT)
-               _arg_cache_in_uint16_setup(arg_cache);
+               _arg_cache_in_uint16_setup (arg_cache);
 
            if (direction == GI_DIRECTION_OUT || direction == GI_DIRECTION_INOUT)
-               _arg_cache_out_uint16_setup(arg_cache);
+               _arg_cache_out_uint16_setup (arg_cache);
 
            break;
        case GI_TYPE_TAG_INT32:
-           arg_cache = _arg_cache_new();
+           arg_cache = _arg_cache_new ();
            if (arg_cache == NULL)
                break;
 
            if (direction == GI_DIRECTION_IN || direction == GI_DIRECTION_INOUT)
-               _arg_cache_in_int32_setup(arg_cache);
+               _arg_cache_in_int32_setup (arg_cache);
 
            if (direction == GI_DIRECTION_OUT || direction == GI_DIRECTION_INOUT)
-               _arg_cache_out_int32_setup(arg_cache);
+               _arg_cache_out_int32_setup (arg_cache);
 
            break;
        case GI_TYPE_TAG_UINT32:
-           arg_cache = _arg_cache_new();
+           arg_cache = _arg_cache_new ();
            if (arg_cache == NULL)
                break;
 
            if (direction == GI_DIRECTION_IN || direction == GI_DIRECTION_INOUT)
-               _arg_cache_in_uint32_setup(arg_cache);
+               _arg_cache_in_uint32_setup (arg_cache);
 
            if (direction == GI_DIRECTION_OUT || direction == GI_DIRECTION_INOUT)
-               _arg_cache_out_uint32_setup(arg_cache);
+               _arg_cache_out_uint32_setup (arg_cache);
 
            break;
        case GI_TYPE_TAG_INT64:
-           arg_cache = _arg_cache_new();
+           arg_cache = _arg_cache_new ();
            if (arg_cache == NULL)
                break;
 
            if (direction == GI_DIRECTION_IN || direction == GI_DIRECTION_INOUT)
-               _arg_cache_in_int64_setup(arg_cache);
+               _arg_cache_in_int64_setup (arg_cache);
 
            if (direction == GI_DIRECTION_OUT || direction == GI_DIRECTION_INOUT)
-               _arg_cache_out_int64_setup(arg_cache);
+               _arg_cache_out_int64_setup (arg_cache);
 
            break;
        case GI_TYPE_TAG_UINT64:
-           arg_cache = _arg_cache_new();
+           arg_cache = _arg_cache_new ();
            if (arg_cache == NULL)
                break;
 
            if (direction == GI_DIRECTION_IN || direction == GI_DIRECTION_INOUT)
-               _arg_cache_in_uint64_setup(arg_cache);
+               _arg_cache_in_uint64_setup (arg_cache);
 
            if (direction == GI_DIRECTION_OUT || direction == GI_DIRECTION_INOUT)
-               _arg_cache_out_uint64_setup(arg_cache);
+               _arg_cache_out_uint64_setup (arg_cache);
 
            break;
        case GI_TYPE_TAG_FLOAT:
-           arg_cache = _arg_cache_new();
+           arg_cache = _arg_cache_new ();
            if (arg_cache == NULL)
                break;
 
            if (direction == GI_DIRECTION_IN || direction == GI_DIRECTION_INOUT)
-               _arg_cache_in_float_setup(arg_cache);
+               _arg_cache_in_float_setup (arg_cache);
 
            if (direction == GI_DIRECTION_OUT || direction == GI_DIRECTION_INOUT)
-               _arg_cache_out_float_setup(arg_cache);
+               _arg_cache_out_float_setup (arg_cache);
 
            break;
        case GI_TYPE_TAG_DOUBLE:
-           arg_cache = _arg_cache_new();
+           arg_cache = _arg_cache_new ();
            if (arg_cache == NULL)
                break;
 
            if (direction == GI_DIRECTION_IN || direction == GI_DIRECTION_INOUT)
-               _arg_cache_in_double_setup(arg_cache);
+               _arg_cache_in_double_setup (arg_cache);
 
            if (direction == GI_DIRECTION_OUT || direction == GI_DIRECTION_INOUT)
-               _arg_cache_out_double_setup(arg_cache);
+               _arg_cache_out_double_setup (arg_cache);
 
            break;
        case GI_TYPE_TAG_UNICHAR:
-           arg_cache = _arg_cache_new();
+           arg_cache = _arg_cache_new ();
            if (arg_cache == NULL)
                break;
 
            if (direction == GI_DIRECTION_IN || direction == GI_DIRECTION_INOUT)
-               _arg_cache_in_unichar_setup(arg_cache);
+               _arg_cache_in_unichar_setup (arg_cache);
 
            if (direction == GI_DIRECTION_OUT || direction == GI_DIRECTION_INOUT)
-               _arg_cache_out_unichar_setup(arg_cache);
+               _arg_cache_out_unichar_setup (arg_cache);
 
            break;
        case GI_TYPE_TAG_GTYPE:
-           arg_cache = _arg_cache_new();
+           arg_cache = _arg_cache_new ();
            if (arg_cache == NULL)
                break;
 
            if (direction == GI_DIRECTION_IN || direction == GI_DIRECTION_INOUT)
-               _arg_cache_in_gtype_setup(arg_cache);
+               _arg_cache_in_gtype_setup (arg_cache);
 
            if (direction == GI_DIRECTION_OUT || direction == GI_DIRECTION_INOUT)
-               _arg_cache_out_gtype_setup(arg_cache);
+               _arg_cache_out_gtype_setup (arg_cache);
 
            break;
        case GI_TYPE_TAG_UTF8:
-           arg_cache = _arg_cache_new();
+           arg_cache = _arg_cache_new ();
            if (arg_cache == NULL)
                break;
 
            if (direction == GI_DIRECTION_IN || direction == GI_DIRECTION_INOUT)
-               _arg_cache_in_utf8_setup(arg_cache, transfer);
+               _arg_cache_in_utf8_setup (arg_cache, transfer);
 
            if (direction == GI_DIRECTION_OUT || direction == GI_DIRECTION_INOUT)
-               _arg_cache_out_utf8_setup(arg_cache, transfer);
+               _arg_cache_out_utf8_setup (arg_cache, transfer);
 
            break;
        case GI_TYPE_TAG_FILENAME:
-           arg_cache = _arg_cache_new();
+           arg_cache = _arg_cache_new ();
            if (arg_cache == NULL)
                break;
 
            if (direction == GI_DIRECTION_IN || direction == GI_DIRECTION_INOUT)
-               _arg_cache_in_filename_setup(arg_cache, transfer);
+               _arg_cache_in_filename_setup (arg_cache, transfer);
 
            if (direction == GI_DIRECTION_OUT || direction == GI_DIRECTION_INOUT)
-               _arg_cache_out_filename_setup(arg_cache, transfer);
+               _arg_cache_out_filename_setup (arg_cache, transfer);
 
            break;
        case GI_TYPE_TAG_ARRAY:
@@ -1130,10 +1130,10 @@ _arg_cache_new_from_type_info (GITypeInfo *type_info,
                    break;
 
                if (direction == GI_DIRECTION_IN || direction == GI_DIRECTION_INOUT)
-                   _arg_cache_in_glist_setup(arg_cache, transfer);
+                   _arg_cache_in_glist_setup (arg_cache, transfer);
 
                if (direction == GI_DIRECTION_OUT || direction == GI_DIRECTION_INOUT)
-                   _arg_cache_out_glist_setup(arg_cache, transfer);
+                   _arg_cache_out_glist_setup (arg_cache, transfer);
 
 
                break;
@@ -1151,34 +1151,34 @@ _arg_cache_new_from_type_info (GITypeInfo *type_info,
                    break;
 
                if (direction == GI_DIRECTION_IN || direction == GI_DIRECTION_INOUT)
-                   _arg_cache_in_gslist_setup(arg_cache, transfer);
+                   _arg_cache_in_gslist_setup (arg_cache, transfer);
 
                if (direction == GI_DIRECTION_OUT || direction == GI_DIRECTION_INOUT)
-                   _arg_cache_out_gslist_setup(arg_cache, transfer);
+                   _arg_cache_out_gslist_setup (arg_cache, transfer);
 
                break;
             }
        case GI_TYPE_TAG_GHASH:
            arg_cache =
-               (PyGIArgCache *)_hash_cache_new_from_type_info(type_info,
-                                                              direction,
-                                                              transfer);
+               (PyGIArgCache *)_hash_cache_new_from_type_info (type_info,
+                                                               direction,
+                                                               transfer);
 
            if (arg_cache == NULL)
                    break;
 
            if (direction == GI_DIRECTION_IN || direction == GI_DIRECTION_INOUT)
-               _arg_cache_in_ghash_setup(arg_cache);
+               _arg_cache_in_ghash_setup (arg_cache);
 
            if (direction == GI_DIRECTION_OUT || direction == GI_DIRECTION_INOUT) {
-               _arg_cache_out_ghash_setup(arg_cache);
+               _arg_cache_out_ghash_setup (arg_cache);
            }
 
            break;
        case GI_TYPE_TAG_INTERFACE:
            {
-               GIInterfaceInfo *interface_info = g_type_info_get_interface(type_info);
-               GIInfoType info_type = g_base_info_get_type( (GIBaseInfo *) interface_info);
+               GIInterfaceInfo *interface_info = g_type_info_get_interface (type_info);
+               GIInfoType info_type = g_base_info_get_type ( (GIBaseInfo *)interface_info);
                arg_cache = _arg_cache_new_from_interface_info (interface_info,
                                                                callable_cache,
                                                                arg_info,
@@ -1192,15 +1192,15 @@ _arg_cache_new_from_type_info (GITypeInfo *type_info,
                break;
            }
        case GI_TYPE_TAG_ERROR:
-           arg_cache = _arg_cache_new();
+           arg_cache = _arg_cache_new ();
            if (arg_cache == NULL)
                break;
 
            if (direction == GI_DIRECTION_IN || direction == GI_DIRECTION_INOUT)
-               _arg_cache_in_gerror_setup(arg_cache);
+               _arg_cache_in_gerror_setup (arg_cache);
 
            if (direction == GI_DIRECTION_OUT || direction == GI_DIRECTION_INOUT)
-               _arg_cache_out_gerror_setup(arg_cache);
+               _arg_cache_out_gerror_setup (arg_cache);
 
            break;
     }
@@ -1211,8 +1211,8 @@ _arg_cache_new_from_type_info (GITypeInfo *type_info,
         arg_cache->type_tag = type_tag;
         arg_cache->py_arg_index = py_arg_index;
         arg_cache->c_arg_index = c_arg_index;
-        arg_cache->is_pointer = g_type_info_is_pointer(type_info);
-        g_base_info_ref( (GIBaseInfo *) type_info);
+        arg_cache->is_pointer = g_type_info_is_pointer (type_info);
+        g_base_info_ref ( (GIBaseInfo *) type_info);
         arg_cache->type_info = type_info;
     }
 
@@ -1376,7 +1376,7 @@ _pygi_callable_cache_new (GICallableInfo *callable_info)
     PyGICallableCache *cache = _callable_cache_new_from_callable_info (callable_info);
     GIInfoType type = g_base_info_get_type ( (GIBaseInfo *)callable_info);
 
-    if  (type == GI_INFO_TYPE_VFUNC)
+    if (type == GI_INFO_TYPE_VFUNC)
         cache->is_vfunc = TRUE;
     else if (type == GI_INFO_TYPE_CALLBACK)
         cache->is_callback = TRUE;
diff --git a/gi/pygi-invoke-ng.c b/gi/pygi-invoke-ng.c
index 8c48f45..c58a217 100644
--- a/gi/pygi-invoke-ng.c
+++ b/gi/pygi-invoke-ng.c
@@ -60,7 +60,7 @@ _invoke_callable (PyGIInvokeState *state,
 
     if (!retval) {
         g_assert (error != NULL);
-        pyglib_error_check(&error);
+        pyglib_error_check (&error);
 
         /* TODO: release input arguments. */
 
@@ -68,7 +68,7 @@ _invoke_callable (PyGIInvokeState *state,
     }
 
     if (state->error != NULL) {
-        if (pyglib_error_check(&(state->error))) {
+        if (pyglib_error_check (&(state->error))) {
             /* TODO: release input arguments. */
 
             return FALSE;
@@ -97,14 +97,14 @@ _invoke_state_init_from_callable_cache (PyGIInvokeState *state,
 
         if (state->constructor_class == NULL) {
             PyErr_Clear ();
-            PyErr_Format(PyExc_TypeError,
-                     "Constructors require the class to be passed in as an argument, "
-                     "No arguments passed to the %s constructor.",
-                     cache->name);
+            PyErr_Format (PyExc_TypeError,
+                          "Constructors require the class to be passed in as an argument, "
+                          "No arguments passed to the %s constructor.",
+                          cache->name);
             return FALSE;
         }
 
-        Py_INCREF(state->constructor_class);
+        Py_INCREF (state->constructor_class);
 
         /* we could optimize this by using offsets instead of modifying the tuple but it makes the
          * code more error prone and confusing so don't do that unless profiling shows
@@ -113,7 +113,7 @@ _invoke_state_init_from_callable_cache (PyGIInvokeState *state,
         state->py_in_args = PyTuple_GetSlice (py_args, 1, state->n_py_in_args);
         state->n_py_in_args--;
     } else {
-        Py_INCREF(state->py_in_args);
+        Py_INCREF (state->py_in_args);
     }
     state->implementor_gtype = 0;
     if (cache->is_vfunc) {
@@ -137,21 +137,21 @@ _invoke_state_init_from_callable_cache (PyGIInvokeState *state,
         return FALSE;
     }
 
-    state->in_args = g_slice_alloc0(cache->n_in_args * sizeof(GIArgument));
+    state->in_args = g_slice_alloc0 (cache->n_in_args * sizeof(GIArgument));
     if (state->in_args == NULL && cache->n_in_args != 0) {
-        PyErr_NoMemory();
+        PyErr_NoMemory ();
         return FALSE;
     }
 
-    state->out_values = g_slice_alloc0(cache->n_out_args * sizeof(GIArgument));
+    state->out_values = g_slice_alloc0 (cache->n_out_args * sizeof(GIArgument));
     if (state->out_values == NULL && cache->n_out_args != 0) {
-        PyErr_NoMemory();
+        PyErr_NoMemory ();
         return FALSE;
     }
 
-    state->out_args = g_slice_alloc0(cache->n_out_args * sizeof(GIArgument));
+    state->out_args = g_slice_alloc0 (cache->n_out_args * sizeof(GIArgument));
     if (state->out_args == NULL && cache->n_out_args != 0) {
-        PyErr_NoMemory();
+        PyErr_NoMemory ();
         return FALSE;
     }
 
@@ -161,29 +161,29 @@ _invoke_state_init_from_callable_cache (PyGIInvokeState *state,
 }
 
 static inline void
-_invoke_state_clear(PyGIInvokeState *state, PyGICallableCache *cache)
+_invoke_state_clear (PyGIInvokeState *state, PyGICallableCache *cache)
 {
-    g_slice_free1(cache->n_args * sizeof(GIArgument *), state->args);
-    g_slice_free1(cache->n_in_args * sizeof(GIArgument), state->in_args);
-    g_slice_free1(cache->n_out_args * sizeof(GIArgument), state->out_args);
-    g_slice_free1(cache->n_out_args * sizeof(GIArgument), state->out_values);
+    g_slice_free1 (cache->n_args * sizeof(GIArgument *), state->args);
+    g_slice_free1 (cache->n_in_args * sizeof(GIArgument), state->in_args);
+    g_slice_free1 (cache->n_out_args * sizeof(GIArgument), state->out_args);
+    g_slice_free1 (cache->n_out_args * sizeof(GIArgument), state->out_values);
 
-    Py_XDECREF(state->py_in_args);
+    Py_XDECREF (state->py_in_args);
 }
 
 static inline gboolean
-_invoke_marshal_in_args(PyGIInvokeState *state, PyGICallableCache *cache)
+_invoke_marshal_in_args (PyGIInvokeState *state, PyGICallableCache *cache)
 {
     int i, in_count, out_count;
     in_count = 0;
     out_count = 0;
 
     if (state->n_py_in_args > cache->n_py_args) {
-        PyErr_Format(PyExc_TypeError,
-                     "%s() takes exactly %zd argument(s) (%zd given)",
-                     cache->name,
-                     cache->n_py_args,
-                     state->n_py_in_args);
+        PyErr_Format (PyExc_TypeError,
+                      "%s() takes exactly %zd argument(s) (%zd given)",
+                      cache->name,
+                      cache->n_py_args,
+                      state->n_py_in_args);
         return FALSE;
     }
 
@@ -201,17 +201,17 @@ _invoke_marshal_in_args(PyGIInvokeState *state, PyGICallableCache *cache)
                     continue;
 
                 if (arg_cache->py_arg_index >= state->n_py_in_args) {
-                    PyErr_Format(PyExc_TypeError,
-                                 "%s() takes exactly %zd argument(s) (%zd given)",
-                                  cache->name,
-                                  cache->n_py_args,
-                                  state->n_py_in_args);
+                    PyErr_Format (PyExc_TypeError,
+                                  "%s() takes exactly %zd argument(s) (%zd given)",
+                                   cache->name,
+                                   cache->n_py_args,
+                                   state->n_py_in_args);
                     return FALSE;
                 }
 
                 py_arg =
-                    PyTuple_GET_ITEM(state->py_in_args,
-                                     arg_cache->py_arg_index);
+                    PyTuple_GET_ITEM (state->py_in_args,
+                                      arg_cache->py_arg_index);
 
                 break;
             case GI_DIRECTION_INOUT:
@@ -224,37 +224,37 @@ _invoke_marshal_in_args(PyGIInvokeState *state, PyGICallableCache *cache)
 
                 if (arg_cache->aux_type != PYGI_AUX_TYPE_IGNORE) {
                     if (arg_cache->py_arg_index >= state->n_py_in_args) {
-                        PyErr_Format(PyExc_TypeError,
-                                     "%s() takes exactly %zd argument(s) (%zd given)",
-                                      cache->name,
-                                      cache->n_py_args,
-                                      state->n_py_in_args);
+                        PyErr_Format (PyExc_TypeError,
+                                      "%s() takes exactly %zd argument(s) (%zd given)",
+                                       cache->name,
+                                       cache->n_py_args,
+                                       state->n_py_in_args);
                         return FALSE;
                     }
 
                     py_arg =
-                        PyTuple_GET_ITEM(state->py_in_args,
-                                         arg_cache->py_arg_index);
+                        PyTuple_GET_ITEM (state->py_in_args,
+                                          arg_cache->py_arg_index);
                 }
             case GI_DIRECTION_OUT:
                 if (arg_cache->is_caller_allocates) {
                     PyGIInterfaceCache *iface_cache =
                         (PyGIInterfaceCache *)arg_cache;
 
-                    g_assert(arg_cache->type_tag == GI_TYPE_TAG_INTERFACE);
+                    g_assert (arg_cache->type_tag == GI_TYPE_TAG_INTERFACE);
 
                     state->out_args[out_count].v_pointer = NULL;
                     state->args[i] = &state->out_args[out_count];
                     if (iface_cache->g_type == G_TYPE_BOXED) {
                         state->args[i]->v_pointer =
-                            _pygi_boxed_alloc(iface_cache->interface_info, NULL);
+                            _pygi_boxed_alloc (iface_cache->interface_info, NULL);
                     } else if (iface_cache->is_foreign) {
                         PyObject *foreign_struct =
-                            pygi_struct_foreign_convert_from_g_argument(
+                            pygi_struct_foreign_convert_from_g_argument (
                                 iface_cache->interface_info,
                                 NULL);
 
-                        pygi_struct_foreign_convert_to_g_argument(
+                        pygi_struct_foreign_convert_to_g_argument (
                             foreign_struct,
                             iface_cache->interface_info,
                             GI_TRANSFER_EVERYTHING,
@@ -263,7 +263,7 @@ _invoke_marshal_in_args(PyGIInvokeState *state, PyGICallableCache *cache)
                         gssize size =
                             g_struct_info_get_size(
                                 (GIStructInfo *)iface_cache->interface_info);
-                        state->args[i]->v_pointer = g_malloc0(size);
+                        state->args[i]->v_pointer = g_malloc0 (size);
                     }
 
                 } else {
@@ -277,17 +277,17 @@ _invoke_marshal_in_args(PyGIInvokeState *state, PyGICallableCache *cache)
         c_arg = state->args[i];
         if (arg_cache->in_marshaller != NULL) {
             if (!arg_cache->allow_none && py_arg == Py_None) {
-                PyErr_Format(PyExc_TypeError,
-                             "Argument %i does not allow None as a value",
-                             i);
+                PyErr_Format (PyExc_TypeError,
+                              "Argument %i does not allow None as a value",
+                              i);
 
                 return FALSE;
             }
-            gboolean success = arg_cache->in_marshaller(state,
-                                                        cache,
-                                                        arg_cache,
-                                                        py_arg,
-                                                        c_arg);
+            gboolean success = arg_cache->in_marshaller (state,
+                                                         cache,
+                                                         arg_cache,
+                                                         py_arg,
+                                                         c_arg);
             if (!success)
                 return FALSE;
         }
@@ -298,7 +298,7 @@ _invoke_marshal_in_args(PyGIInvokeState *state, PyGICallableCache *cache)
 }
 
 static inline PyObject *
-_invoke_marshal_out_args(PyGIInvokeState *state, PyGICallableCache *cache)
+_invoke_marshal_out_args (PyGIInvokeState *state, PyGICallableCache *cache)
 {
     PyObject *py_out = NULL;
     PyObject *py_return = NULL;
@@ -313,10 +313,10 @@ _invoke_marshal_out_args(PyGIInvokeState *state, PyGICallableCache *cache)
             }
         }
 
-        py_return = cache->return_cache->out_marshaller(state,
-                                                        cache,
-                                                        cache->return_cache,
-                                                        &state->return_arg);
+        py_return = cache->return_cache->out_marshaller ( state,
+                                                          cache,
+                                                          cache->return_cache,
+                                                         &state->return_arg);
         if (py_return == NULL)
             return NULL;
 
@@ -333,32 +333,32 @@ _invoke_marshal_out_args(PyGIInvokeState *state, PyGICallableCache *cache)
     } else if (total_out_args == 1) {
         /* if we get here there is one out arg an no return */
         PyGIArgCache *arg_cache = (PyGIArgCache *)cache->out_args->data;
-        py_out = arg_cache->out_marshaller(state,
-                                           cache,
-                                           arg_cache,
-                                           state->args[arg_cache->c_arg_index]);
+        py_out = arg_cache->out_marshaller (state,
+                                            cache,
+                                            arg_cache,
+                                            state->args[arg_cache->c_arg_index]);
     } else {
         int out_cache_index = 0;
         int py_arg_index = 0;
         GSList *cache_item = cache->out_args;
         /* return a tuple */
-        py_out = PyTuple_New(total_out_args);
+        py_out = PyTuple_New (total_out_args);
         if (has_return) {
-            PyTuple_SET_ITEM(py_out, py_arg_index, py_return);
+            PyTuple_SET_ITEM (py_out, py_arg_index, py_return);
             py_arg_index++;
         }
 
         for(; py_arg_index < total_out_args; py_arg_index++) {
             PyGIArgCache *arg_cache = (PyGIArgCache *)cache_item->data;
-            PyObject *py_obj = arg_cache->out_marshaller(state,
-                                                         cache,
-                                                         arg_cache,
-                                                         state->args[arg_cache->c_arg_index]);
+            PyObject *py_obj = arg_cache->out_marshaller (state,
+                                                          cache,
+                                                          arg_cache,
+                                                          state->args[arg_cache->c_arg_index]);
 
             if (py_obj == NULL)
                 return NULL;
 
-            PyTuple_SET_ITEM(py_out, py_arg_index, py_obj);
+            PyTuple_SET_ITEM (py_out, py_arg_index, py_obj);
             cache_item = cache_item->next;
         }
     }
@@ -374,16 +374,16 @@ _wrap_g_callable_info_invoke (PyGIBaseInfo *self,
     PyObject *ret;
 
     if (self->cache == NULL) {
-        self->cache = _pygi_callable_cache_new(self->info);
+        self->cache = _pygi_callable_cache_new (self->info);
         if (self->cache == NULL)
             return NULL;
     }
 
-    _invoke_state_init_from_callable_cache(&state, self->cache, py_args, kwargs);
+    _invoke_state_init_from_callable_cache (&state, self->cache, py_args, kwargs);
     if (!_invoke_marshal_in_args (&state, self->cache))
         goto err;
 
-    if (!_invoke_callable(&state, self->cache, self->info))
+    if (!_invoke_callable (&state, self->cache, self->info))
         goto err;
 
     ret = _invoke_marshal_out_args (&state, self->cache);
@@ -394,4 +394,3 @@ err:
     _invoke_state_clear (&state, self->cache);
     return NULL;
 }
-
diff --git a/gi/pygi-marshal.c b/gi/pygi-marshal.c
index 2909211..62606b4 100644
--- a/gi/pygi-marshal.c
+++ b/gi/pygi-marshal.c
@@ -55,7 +55,7 @@ _pygi_marshal_in_boolean (PyGIInvokeState   *state,
                           PyObject          *py_arg,
                           GIArgument        *arg)
 {
-    arg->v_boolean = PyObject_IsTrue(py_arg);
+    arg->v_boolean = PyObject_IsTrue (py_arg);
 
     return TRUE;
 }
@@ -70,20 +70,20 @@ _pygi_marshal_in_int8 (PyGIInvokeState   *state,
     PyObject *py_long;
     long long_;
 
-    if (!PyNumber_Check(py_arg)) {
+    if (!PyNumber_Check (py_arg)) {
         PyErr_Format (PyExc_TypeError, "Must be number, not %s",
                       py_arg->ob_type->tp_name);
         return FALSE;
     }
 
-    py_long = PYGLIB_PyNumber_Long(py_arg);
+    py_long = PYGLIB_PyNumber_Long (py_arg);
     if (!py_long)
         return FALSE;
 
-    long_ = PYGLIB_PyLong_AsLong(py_long);
-    Py_DECREF(py_long);
+    long_ = PYGLIB_PyLong_AsLong (py_long);
+    Py_DECREF (py_long);
 
-    if (PyErr_Occurred())
+    if (PyErr_Occurred ())
         return FALSE;
 
     if (long_ < -128 || long_ > 127) {
@@ -105,25 +105,25 @@ _pygi_marshal_in_uint8 (PyGIInvokeState   *state,
 {
     unsigned long long_;
 
-    if (PYGLIB_PyBytes_Check(py_arg)) {
+    if (PYGLIB_PyBytes_Check (py_arg)) {
 
-        if (PYGLIB_PyBytes_Size(py_arg) != 1) {
+        if (PYGLIB_PyBytes_Size (py_arg) != 1) {
             PyErr_Format (PyExc_TypeError, "Must be a single character");
             return FALSE;
         }
 
-        long_ = (unsigned char)(PYGLIB_PyBytes_AsString(py_arg)[0]);
+        long_ = (unsigned char)(PYGLIB_PyBytes_AsString (py_arg)[0]);
 
-    } else if (PyNumber_Check(py_arg)) {
+    } else if (PyNumber_Check (py_arg)) {
         PyObject *py_long;
-        py_long = PYGLIB_PyNumber_Long(py_arg);
+        py_long = PYGLIB_PyNumber_Long (py_arg);
         if (!py_long)
             return FALSE;
 
-        long_ = PYGLIB_PyLong_AsLong(py_long);
-        Py_DECREF(py_long);
+        long_ = PYGLIB_PyLong_AsLong (py_long);
+        Py_DECREF (py_long);
 
-        if (PyErr_Occurred())
+        if (PyErr_Occurred ())
             return FALSE;
     } else {
         PyErr_Format (PyExc_TypeError, "Must be number or single byte string, not %s",
@@ -151,20 +151,20 @@ _pygi_marshal_in_int16 (PyGIInvokeState   *state,
     PyObject *py_long;
     long long_;
 
-    if (!PyNumber_Check(py_arg)) {
+    if (!PyNumber_Check (py_arg)) {
         PyErr_Format (PyExc_TypeError, "Must be number, not %s",
                       py_arg->ob_type->tp_name);
         return FALSE;
     }
 
-    py_long = PYGLIB_PyNumber_Long(py_arg);
+    py_long = PYGLIB_PyNumber_Long (py_arg);
     if (!py_long)
         return FALSE;
 
-    long_ = PYGLIB_PyLong_AsLong(py_long);
-    Py_DECREF(py_long);
+    long_ = PYGLIB_PyLong_AsLong (py_long);
+    Py_DECREF (py_long);
 
-    if (PyErr_Occurred())
+    if (PyErr_Occurred ())
         return FALSE;
 
     if (long_ < -32768 || long_ > 32767) {
@@ -187,20 +187,20 @@ _pygi_marshal_in_uint16 (PyGIInvokeState   *state,
     PyObject *py_long;
     long long_;
 
-    if (!PyNumber_Check(py_arg)) {
+    if (!PyNumber_Check (py_arg)) {
         PyErr_Format (PyExc_TypeError, "Must be number, not %s",
                       py_arg->ob_type->tp_name);
         return FALSE;
     }
 
-    py_long = PYGLIB_PyNumber_Long(py_arg);
+    py_long = PYGLIB_PyNumber_Long (py_arg);
     if (!py_long)
         return FALSE;
 
-    long_ = PYGLIB_PyLong_AsLong(py_long);
-    Py_DECREF(py_long);
+    long_ = PYGLIB_PyLong_AsLong (py_long);
+    Py_DECREF (py_long);
 
-    if (PyErr_Occurred())
+    if (PyErr_Occurred ())
         return FALSE;
 
     if (long_ < 0 || long_ > 65535) {
@@ -223,20 +223,20 @@ _pygi_marshal_in_int32 (PyGIInvokeState   *state,
     PyObject *py_long;
     long long_;
 
-    if (!PyNumber_Check(py_arg)) {
+    if (!PyNumber_Check (py_arg)) {
         PyErr_Format (PyExc_TypeError, "Must be number, not %s",
                       py_arg->ob_type->tp_name);
         return FALSE;
     }
 
-    py_long = PYGLIB_PyNumber_Long(py_arg);
+    py_long = PYGLIB_PyNumber_Long (py_arg);
     if (!py_long)
         return FALSE;
 
-    long_ = PYGLIB_PyLong_AsLong(py_long);
-    Py_DECREF(py_long);
+    long_ = PYGLIB_PyLong_AsLong (py_long);
+    Py_DECREF (py_long);
 
-    if (PyErr_Occurred())
+    if (PyErr_Occurred ())
         return FALSE;
 
     if (long_ < G_MININT32 || long_ > G_MAXINT32) {
@@ -259,13 +259,13 @@ _pygi_marshal_in_uint32 (PyGIInvokeState   *state,
     PyObject *py_long;
     long long long_;
 
-    if (!PyNumber_Check(py_arg)) {
+    if (!PyNumber_Check (py_arg)) {
         PyErr_Format (PyExc_TypeError, "Must be number, not %s",
                       py_arg->ob_type->tp_name);
         return FALSE;
     }
 
-    py_long = PYGLIB_PyNumber_Long(py_arg);
+    py_long = PYGLIB_PyNumber_Long (py_arg);
     if (!py_long)
         return FALSE;
 
@@ -274,11 +274,11 @@ _pygi_marshal_in_uint32 (PyGIInvokeState   *state,
         long_ = PyInt_AsLong (py_long);
     else
 #endif
-        long_ = PyLong_AsLongLong(py_long);
+        long_ = PyLong_AsLongLong (py_long);
 
-    Py_DECREF(py_long);
+    Py_DECREF (py_long);
 
-    if (PyErr_Occurred())
+    if (PyErr_Occurred ())
         return FALSE;
 
     if (long_ < 0 || long_ > G_MAXUINT32) {
@@ -301,13 +301,13 @@ _pygi_marshal_in_int64 (PyGIInvokeState   *state,
     PyObject *py_long;
     long long long_;
 
-    if (!PyNumber_Check(py_arg)) {
+    if (!PyNumber_Check (py_arg)) {
         PyErr_Format (PyExc_TypeError, "Must be number, not %s",
                       py_arg->ob_type->tp_name);
         return FALSE;
     }
 
-    py_long = PYGLIB_PyNumber_Long(py_arg);
+    py_long = PYGLIB_PyNumber_Long (py_arg);
     if (!py_long)
         return FALSE;
 
@@ -316,37 +316,37 @@ _pygi_marshal_in_int64 (PyGIInvokeState   *state,
         long_ = PyInt_AS_LONG (py_long);
     else
 #endif
-        long_ = PyLong_AsLongLong(py_long);
+        long_ = PyLong_AsLongLong (py_long);
 
-    Py_DECREF(py_long);
+    Py_DECREF (py_long);
 
-    if (PyErr_Occurred()) {
+    if (PyErr_Occurred ()) {
         /* OverflowError occured but range errors should be returned as ValueError */
         char *long_str;
-        PyObject *py_str = PyObject_Str(py_long);
+        PyObject *py_str = PyObject_Str (py_long);
 
-        if (PyUnicode_Check(py_str)) {
-            PyObject *py_bytes = PyUnicode_AsUTF8String(py_str);
+        if (PyUnicode_Check (py_str)) {
+            PyObject *py_bytes = PyUnicode_AsUTF8String (py_str);
             if (py_bytes == NULL)
                 return FALSE;
 
-            long_str = g_strdup(PYGLIB_PyBytes_AsString(py_bytes));
+            long_str = g_strdup (PYGLIB_PyBytes_AsString (py_bytes));
             if (long_str == NULL) {
-                PyErr_NoMemory();
+                PyErr_NoMemory ();
                 return FALSE;
             }
 
-            Py_DECREF(py_bytes);
+            Py_DECREF (py_bytes);
         } else {
-            long_str = g_strdup(PYGLIB_PyBytes_AsString(py_str));
+            long_str = g_strdup (PYGLIB_PyBytes_AsString(py_str));
         }
 
-        Py_DECREF(py_str);
-        PyErr_Clear();
-        PyErr_Format(PyExc_ValueError, "%s not in range %ld to %ld",
-                     long_str, G_MININT64, G_MAXINT64);
+        Py_DECREF (py_str);
+        PyErr_Clear ();
+        PyErr_Format (PyExc_ValueError, "%s not in range %ld to %ld",
+                      long_str, G_MININT64, G_MAXINT64);
 
-        g_free(long_str);
+        g_free (long_str);
         return FALSE;
     }
 
@@ -370,19 +370,19 @@ _pygi_marshal_in_uint64 (PyGIInvokeState   *state,
     PyObject *py_long;
     guint64 ulong_;
 
-    if (!PyNumber_Check(py_arg)) {
+    if (!PyNumber_Check (py_arg)) {
         PyErr_Format (PyExc_TypeError, "Must be number, not %s",
                       py_arg->ob_type->tp_name);
         return FALSE;
     }
 
-    py_long = PYGLIB_PyNumber_Long(py_arg);
+    py_long = PYGLIB_PyNumber_Long (py_arg);
     if (!py_long)
         return FALSE;
 
 #if PY_VERSION_HEX < 0x03000000
     if (PyInt_Check (py_long)) {
-        long long_ = PyInt_AsLong(py_long);
+        long long_ = PyInt_AsLong (py_long);
         if (long_ < 0) {
             PyErr_Format (PyExc_ValueError, "%ld not in range %d to %llu",
                           long_, 0, G_MAXUINT64);
@@ -391,37 +391,37 @@ _pygi_marshal_in_uint64 (PyGIInvokeState   *state,
         ulong_ = long_;
     } else
 #endif
-        ulong_ = PyLong_AsUnsignedLongLong(py_long);
+        ulong_ = PyLong_AsUnsignedLongLong (py_long);
 
-    Py_DECREF(py_long);
+    Py_DECREF (py_long);
 
-    if (PyErr_Occurred()) {
+    if (PyErr_Occurred ()) {
         /* OverflowError occured but range errors should be returned as ValueError */
         char *long_str;
-        PyObject *py_str = PyObject_Str(py_long);
+        PyObject *py_str = PyObject_Str (py_long);
 
-        if (PyUnicode_Check(py_str)) {
-            PyObject *py_bytes = PyUnicode_AsUTF8String(py_str);
+        if (PyUnicode_Check (py_str)) {
+            PyObject *py_bytes = PyUnicode_AsUTF8String (py_str);
             if (py_bytes == NULL)
                 return FALSE;
 
-            long_str = g_strdup(PYGLIB_PyBytes_AsString(py_bytes));
+            long_str = g_strdup (PYGLIB_PyBytes_AsString (py_bytes));
             if (long_str == NULL) {
-                PyErr_NoMemory();
+                PyErr_NoMemory ();
                 return FALSE;
             }
 
-            Py_DECREF(py_bytes);
+            Py_DECREF (py_bytes);
         } else {
-            long_str = g_strdup(PYGLIB_PyBytes_AsString(py_str));
+            long_str = g_strdup (PYGLIB_PyBytes_AsString (py_str));
         }
 
-        Py_DECREF(py_str);
-        PyErr_Clear();
-        PyErr_Format(PyExc_ValueError, "%s not in range %d to %llu",
-                     long_str, 0, G_MAXUINT64);
+        Py_DECREF (py_str);
+        PyErr_Clear ();
+        PyErr_Format (PyExc_ValueError, "%s not in range %d to %llu",
+                      long_str, 0, G_MAXUINT64);
 
-        g_free(long_str);
+        g_free (long_str);
         return FALSE;
     }
 
@@ -445,20 +445,20 @@ _pygi_marshal_in_float (PyGIInvokeState   *state,
     PyObject *py_float;
     double double_;
 
-    if (!PyNumber_Check(py_arg)) {
+    if (!PyNumber_Check (py_arg)) {
         PyErr_Format (PyExc_TypeError, "Must be number, not %s",
                       py_arg->ob_type->tp_name);
         return FALSE;
     }
 
-    py_float = PyNumber_Float(py_arg);
+    py_float = PyNumber_Float (py_arg);
     if (!py_float)
         return FALSE;
 
-    double_ = PyFloat_AsDouble(py_float);
-    Py_DECREF(py_float);
+    double_ = PyFloat_AsDouble (py_float);
+    Py_DECREF (py_float);
 
-    if (PyErr_Occurred())
+    if (PyErr_Occurred ())
         return FALSE;
 
     if (double_ < -G_MAXFLOAT || double_ > G_MAXFLOAT) {
@@ -481,20 +481,20 @@ _pygi_marshal_in_double (PyGIInvokeState   *state,
     PyObject *py_float;
     double double_;
 
-    if (!PyNumber_Check(py_arg)) {
+    if (!PyNumber_Check (py_arg)) {
         PyErr_Format (PyExc_TypeError, "Must be number, not %s",
                       py_arg->ob_type->tp_name);
         return FALSE;
     }
 
-    py_float = PyNumber_Float(py_arg);
+    py_float = PyNumber_Float (py_arg);
     if (!py_float)
         return FALSE;
 
-    double_ = PyFloat_AsDouble(py_float);
-    Py_DECREF(py_float);
+    double_ = PyFloat_AsDouble (py_float);
+    Py_DECREF (py_float);
 
-    if (PyErr_Occurred())
+    if (PyErr_Occurred ())
         return FALSE;
 
     if (double_ < -G_MAXDOUBLE || double_ > G_MAXDOUBLE) {
@@ -521,9 +521,9 @@ _pygi_marshal_in_unichar (PyGIInvokeState   *state,
        PyObject *py_bytes;
 
        size = PyUnicode_GET_SIZE (py_arg);
-       py_bytes = PyUnicode_AsUTF8String(py_arg);
-       string_ = strdup(PYGLIB_PyBytes_AsString(py_bytes));
-       Py_DECREF(py_bytes);
+       py_bytes = PyUnicode_AsUTF8String (py_arg);
+       string_ = strdup(PYGLIB_PyBytes_AsString (py_bytes));
+       Py_DECREF (py_bytes);
 
 #if PY_VERSION_HEX < 0x03000000
     } else if (PyString_Check (py_arg)) {
@@ -532,8 +532,8 @@ _pygi_marshal_in_unichar (PyGIInvokeState   *state,
            return FALSE;
 
        size = PyUnicode_GET_SIZE (pyuni);
-       string_ = g_strdup(PyString_AsString(py_arg));
-       Py_DECREF(pyuni);
+       string_ = g_strdup (PyString_AsString(py_arg));
+       Py_DECREF (pyuni);
 #endif
     } else {
        PyErr_Format (PyExc_TypeError, "Must be string, not %s",
@@ -544,12 +544,12 @@ _pygi_marshal_in_unichar (PyGIInvokeState   *state,
     if (size != 1) {
        PyErr_Format (PyExc_TypeError, "Must be a one character string, not %ld characters",
                      size);
-       g_free(string_);
+       g_free (string_);
        return FALSE;
     }
 
-    arg->v_uint32 = g_utf8_get_char(string_);
-    g_free(string_);
+    arg->v_uint32 = g_utf8_get_char (string_);
+    g_free (string_);
 
     return TRUE;
 }
@@ -585,17 +585,17 @@ _pygi_marshal_in_utf8 (PyGIInvokeState   *state,
         return TRUE;
     }
 
-    if (PyUnicode_Check(py_arg)) {
+    if (PyUnicode_Check (py_arg)) {
         PyObject *pystr_obj = PyUnicode_AsUTF8String (py_arg);
         if (!pystr_obj)
             return FALSE;
 
-        string_ = g_strdup(PYGLIB_PyBytes_AsString (pystr_obj));
-        Py_DECREF(pystr_obj);
+        string_ = g_strdup (PYGLIB_PyBytes_AsString (pystr_obj));
+        Py_DECREF (pystr_obj);
     }
 #if PY_VERSION_HEX < 0x03000000
-    else if (PyString_Check(py_arg)) {
-        string_ = g_strdup(PyString_AsString (py_arg));
+    else if (PyString_Check (py_arg)) {
+        string_ = g_strdup (PyString_AsString (py_arg));
     }
 #endif
     else {
@@ -618,17 +618,17 @@ _pygi_marshal_in_filename (PyGIInvokeState   *state,
     gchar *string_;
     GError *error = NULL;
 
-    if (PyUnicode_Check(py_arg)) {
+    if (PyUnicode_Check (py_arg)) {
         PyObject *pystr_obj = PyUnicode_AsUTF8String (py_arg);
         if (!pystr_obj)
             return FALSE;
 
-        string_ = g_strdup(PYGLIB_PyBytes_AsString (pystr_obj));
-        Py_DECREF(pystr_obj);
+        string_ = g_strdup (PYGLIB_PyBytes_AsString (pystr_obj));
+        Py_DECREF (pystr_obj);
     }
 #if PY_VERSION_HEX < 0x03000000
-    else if (PyString_Check(py_arg)) {
-        string_ = g_strdup(PyString_AsString (py_arg));
+    else if (PyString_Check (py_arg)) {
+        string_ = g_strdup (PyString_AsString (py_arg));
     }
 #endif
     else {
@@ -638,11 +638,11 @@ _pygi_marshal_in_filename (PyGIInvokeState   *state,
     }
 
     arg->v_string = g_filename_from_utf8 (string_, -1, NULL, NULL, &error);
-    g_free(string_);
+    g_free (string_);
 
     if (arg->v_string == NULL) {
         PyErr_SetString (PyExc_Exception, error->message);
-        g_error_free(error);
+        g_error_free (error);
         /* TODO: Convert the error to an exception. */
         return FALSE;
     }
@@ -693,13 +693,13 @@ _pygi_marshal_in_array (PyGIInvokeState   *state,
                                 length);
 
     if (array_ == NULL) {
-        PyErr_NoMemory();
+        PyErr_NoMemory ();
         return FALSE;
     }
 
     if (sequence_cache->item_cache->type_tag == GI_TYPE_TAG_UINT8 &&
-        PYGLIB_PyBytes_Check(py_arg)) {
-        memcpy(array_->data, PYGLIB_PyBytes_AsString(py_arg), length);
+        PYGLIB_PyBytes_Check (py_arg)) {
+        memcpy(array_->data, PYGLIB_PyBytes_AsString (py_arg), length);
 
         goto array_success;
     }
@@ -711,14 +711,14 @@ _pygi_marshal_in_array (PyGIInvokeState   *state,
         if (py_item == NULL)
             goto err;
 
-        if (!in_marshaller(state,
-                           callable_cache,
-                           sequence_cache->item_cache,
-                           py_item,
-                           &item))
+        if (!in_marshaller ( state,
+                             callable_cache,
+                             sequence_cache->item_cache,
+                             py_item,
+                            &item))
             goto err;
 
-        g_array_insert_val(array_, i, item);
+        g_array_insert_val (array_, i, item);
         continue;
 err:
         if (sequence_cache->item_cache->cleanup != NULL) {
@@ -727,7 +727,7 @@ err:
                 cleanup((gpointer)(array_->data[j]));*/
         }
 
-        g_array_free(array_, TRUE);
+        g_array_free (array_, TRUE);
         _PyGI_ERROR_PREFIX ("Item %i: ", i);
         return FALSE;
     }
@@ -745,14 +745,14 @@ array_success:
                 state->in_args[aux_cache->c_arg_index].v_long = length;
             else
                 *len_arg = length;
-        } else {              
+        } else {
             state->in_args[aux_cache->c_arg_index].v_long = length;
         }
     }
 
     if (sequence_cache->array_type == GI_ARRAY_TYPE_C) {
         arg->v_pointer = array_->data;
-        g_array_free(array_, FALSE);
+        g_array_free (array_, FALSE);
     } else {
         arg->v_pointer = array_;
     }
@@ -785,7 +785,7 @@ _pygi_marshal_in_glist (PyGIInvokeState   *state,
         return FALSE;
     }
 
-    length = PySequence_Length(py_arg);
+    length = PySequence_Length (py_arg);
     if (length < 0)
         return FALSE;
 
@@ -804,21 +804,21 @@ _pygi_marshal_in_glist (PyGIInvokeState   *state,
         if (py_item == NULL)
             goto err;
 
-        if (!in_marshaller(state,
-                           callable_cache,
-                           sequence_cache->item_cache,
-                           py_item,
-                           &item))
+        if (!in_marshaller ( state,
+                             callable_cache,
+                             sequence_cache->item_cache,
+                             py_item,
+                            &item))
             goto err;
 
-        list_ = g_list_append(list_, item.v_pointer);
+        list_ = g_list_append (list_, item.v_pointer);
         continue;
 err:
         if (sequence_cache->item_cache->cleanup != NULL) {
             GDestroyNotify cleanup = sequence_cache->item_cache->cleanup;
         }
 
-        g_list_free(list_);
+        g_list_free (list_);
         _PyGI_ERROR_PREFIX ("Item %i: ", i);
         return FALSE;
     }
@@ -851,7 +851,7 @@ _pygi_marshal_in_gslist (PyGIInvokeState   *state,
         return FALSE;
     }
 
-    length = PySequence_Length(py_arg);
+    length = PySequence_Length (py_arg);
     if (length < 0)
         return FALSE;
 
@@ -870,21 +870,21 @@ _pygi_marshal_in_gslist (PyGIInvokeState   *state,
         if (py_item == NULL)
             goto err;
 
-        if (!in_marshaller(state,
-                           callable_cache,
-                           sequence_cache->item_cache,
-                           py_item,
-                           &item))
+        if (!in_marshaller ( state,
+                             callable_cache,
+                             sequence_cache->item_cache,
+                             py_item,
+                            &item))
             goto err;
 
-        list_ = g_slist_append(list_, item.v_pointer);
+        list_ = g_slist_append (list_, item.v_pointer);
         continue;
 err:
         if (sequence_cache->item_cache->cleanup != NULL) {
             GDestroyNotify cleanup = sequence_cache->item_cache->cleanup;
         }
 
-        g_slist_free(list_);
+        g_slist_free (list_);
         _PyGI_ERROR_PREFIX ("Item %i: ", i);
         return FALSE;
     }
@@ -918,22 +918,22 @@ _pygi_marshal_in_ghash (PyGIInvokeState   *state,
         return TRUE;
     }
 
-    py_keys = PyMapping_Keys(py_arg);
+    py_keys = PyMapping_Keys (py_arg);
     if (py_keys == NULL) {
         PyErr_Format (PyExc_TypeError, "Must be mapping, not %s",
                       py_arg->ob_type->tp_name);
         return FALSE;
     }
 
-    length = PyMapping_Length(py_arg);
+    length = PyMapping_Length (py_arg);
     if (length < 0) {
-        Py_DECREF(py_keys);
+        Py_DECREF (py_keys);
         return FALSE;
     }
 
-    py_values = PyMapping_Values(py_arg);
+    py_values = PyMapping_Values (py_arg);
     if (py_values == NULL) {
-        Py_DECREF(py_keys);
+        Py_DECREF (py_keys);
         return FALSE;
     }
 
@@ -953,9 +953,9 @@ _pygi_marshal_in_ghash (PyGIInvokeState   *state,
 
     hash_ = g_hash_table_new (hash_func, equal_func);
     if (hash_ == NULL) {
-        PyErr_NoMemory();
-        Py_DECREF(py_keys);
-        Py_DECREF(py_values);
+        PyErr_NoMemory ();
+        Py_DECREF (py_keys);
+        Py_DECREF (py_values);
         return FALSE;
     }
 
@@ -966,29 +966,29 @@ _pygi_marshal_in_ghash (PyGIInvokeState   *state,
         if (py_key == NULL || py_value == NULL)
             goto err;
 
-        if (!key_in_marshaller(state,
-                               callable_cache,
-                               hash_cache->key_cache,
-                               py_key,
-                               &key))
+        if (!key_in_marshaller ( state,
+                                 callable_cache,
+                                 hash_cache->key_cache,
+                                 py_key,
+                                &key))
             goto err;
 
-        if (!value_in_marshaller(state,
-                                 callable_cache,
-                                 hash_cache->value_cache,
-                                 py_value,
-                                 &value))
+        if (!value_in_marshaller ( state,
+                                   callable_cache,
+                                   hash_cache->value_cache,
+                                   py_value,
+                                  &value))
             goto err;
 
-        g_hash_table_insert(hash_, key.v_pointer, value.v_pointer);
+        g_hash_table_insert (hash_, key.v_pointer, value.v_pointer);
         continue;
 err:
         /* FIXME: cleanup hash keys and values */
-        Py_XDECREF(py_key);
-        Py_XDECREF(py_value);
-        Py_DECREF(py_keys);
-        Py_DECREF(py_values);
-        g_hash_table_unref(hash_);
+        Py_XDECREF (py_key);
+        Py_XDECREF (py_value);
+        Py_DECREF (py_keys);
+        Py_DECREF (py_values);
+        g_hash_table_unref (hash_);
         _PyGI_ERROR_PREFIX ("Item %i: ", i);
         return FALSE;
     }
@@ -1004,8 +1004,8 @@ _pygi_marshal_in_gerror (PyGIInvokeState   *state,
                          PyObject          *py_arg,
                          GIArgument        *arg)
 {
-    PyErr_Format(PyExc_NotImplementedError,
-                 "Marshalling for GErrors is not implemented");
+    PyErr_Format (PyExc_NotImplementedError,
+                  "Marshalling for GErrors is not implemented");
     return FALSE;
 }
 
@@ -1028,33 +1028,33 @@ _pygi_marshal_in_interface_callback (PyGIInvokeState   *state,
     if (callback_cache->user_data_index > 0) {
         user_data_cache = callable_cache->args_cache[callback_cache->user_data_index];
         if (user_data_cache->py_arg_index < state->n_py_in_args) {
-            py_user_data = PyTuple_GetItem(state->py_in_args, user_data_cache->py_arg_index);
+            py_user_data = PyTuple_GetItem (state->py_in_args, user_data_cache->py_arg_index);
             if (!py_user_data)
                 return FALSE;
         } else {
             py_user_data = Py_None;
-            Py_INCREF(Py_None);
+            Py_INCREF (Py_None);
         }
     }
 
     if (py_arg == Py_None && !(py_user_data == Py_None || py_user_data == NULL)) {
-        Py_DECREF(py_user_data);
-        PyErr_Format(PyExc_TypeError,
-                     "When passing None for a callback userdata must also be None");
+        Py_DECREF (py_user_data);
+        PyErr_Format (PyExc_TypeError,
+                      "When passing None for a callback userdata must also be None");
 
         return FALSE;
     }
 
     if (py_arg == Py_None) {
-        Py_XDECREF(py_user_data);
+        Py_XDECREF (py_user_data);
         return TRUE;
     }
 
-    if (!PyCallable_Check(py_arg)) {
-        Py_XDECREF(py_user_data);
-        PyErr_Format(PyExc_TypeError,
-                    "Callback needs to be a function or method not %s",
-                    py_arg->ob_type->tp_name);
+    if (!PyCallable_Check (py_arg)) {
+        Py_XDECREF (py_user_data);
+        PyErr_Format (PyExc_TypeError,
+                      "Callback needs to be a function or method not %s",
+                      py_arg->ob_type->tp_name);
 
         return FALSE;
     }
@@ -1071,7 +1071,7 @@ _pygi_marshal_in_interface_callback (PyGIInvokeState   *state,
     }
 
     if (destroy_cache) {
-        PyGICClosure *destroy_notify = _pygi_destroy_notify_create();
+        PyGICClosure *destroy_notify = _pygi_destroy_notify_create ();
         state->in_args[destroy_cache->c_arg_index].v_pointer = destroy_notify->closure;
     }
 
@@ -1089,16 +1089,16 @@ _pygi_marshal_in_interface_enum (PyGIInvokeState   *state,
     gint is_instance;
     PyGIInterfaceCache *iface_cache = (PyGIInterfaceCache *)arg_cache;
 
-    is_instance = PyObject_IsInstance(py_arg, iface_cache->py_type);
+    is_instance = PyObject_IsInstance (py_arg, iface_cache->py_type);
 
-    int_ = PYGLIB_PyNumber_Long(py_arg);
+    int_ = PYGLIB_PyNumber_Long (py_arg);
     if (int_ == NULL) {
         PyErr_Clear();
         goto err;
     }
 
-    arg->v_long = PYGLIB_PyLong_AsLong(int_);
-    Py_DECREF(int_);
+    arg->v_long = PYGLIB_PyLong_AsLong (int_);
+    Py_DECREF (int_);
 
     /* If this is not an instance of the Enum type that we want
      * we need to check if the value is equivilant to one of the
@@ -1107,11 +1107,11 @@ _pygi_marshal_in_interface_enum (PyGIInvokeState   *state,
         int i;
         gboolean is_found = FALSE;
 
-        for (i = 0; i < g_enum_info_get_n_values(iface_cache->interface_info); i++) {
+        for (i = 0; i < g_enum_info_get_n_values (iface_cache->interface_info); i++) {
             GIValueInfo *value_info =
-                g_enum_info_get_value(iface_cache->interface_info, i);
-            glong enum_value = g_value_info_get_value(value_info);
-            g_base_info_unref( (GIBaseInfo *)value_info);
+                g_enum_info_get_value (iface_cache->interface_info, i);
+            glong enum_value = g_value_info_get_value (value_info);
+            g_base_info_unref ( (GIBaseInfo *)value_info);
             if (arg->v_long == enum_value) {
                 is_found = TRUE;
                 break;
@@ -1125,8 +1125,8 @@ _pygi_marshal_in_interface_enum (PyGIInvokeState   *state,
     return TRUE;
 
 err:
-    PyErr_Format(PyExc_TypeError, "Expected a %s, but got %s",
-                 iface_cache->type_name, py_arg->ob_type->tp_name);
+    PyErr_Format (PyExc_TypeError, "Expected a %s, but got %s",
+                  iface_cache->type_name, py_arg->ob_type->tp_name);
     return FALSE;
 }
 
@@ -1141,16 +1141,16 @@ _pygi_marshal_in_interface_flags (PyGIInvokeState   *state,
     gint is_instance;
     PyGIInterfaceCache *iface_cache = (PyGIInterfaceCache *)arg_cache;
 
-    is_instance = PyObject_IsInstance(py_arg, iface_cache->py_type);
+    is_instance = PyObject_IsInstance (py_arg, iface_cache->py_type);
 
-    int_ = PYGLIB_PyNumber_Long(py_arg);
+    int_ = PYGLIB_PyNumber_Long (py_arg);
     if (int_ == NULL) {
-        PyErr_Clear();
+        PyErr_Clear ();
         goto err;
     }
 
-    arg->v_long = PYGLIB_PyLong_AsLong(int_);
-    Py_DECREF(int_);
+    arg->v_long = PYGLIB_PyLong_AsLong (int_);
+    Py_DECREF (int_);
 
     /* only 0 or argument of type Flag is allowed */
     if (!is_instance && arg->v_long != 0)
@@ -1189,8 +1189,8 @@ _pygi_marshal_in_interface_struct (PyGIInvokeState   *state,
 
         if ( !(PyCallable_Check(py_arg) || 
                g_type_is_a (object_gtype, G_TYPE_CLOSURE))) {
-            PyErr_Format(PyExc_TypeError, "Must be callable, not %s",
-                         py_arg->ob_type->tp_name);
+            PyErr_Format (PyExc_TypeError, "Must be callable, not %s",
+                          py_arg->ob_type->tp_name);
             return FALSE;
         }
 
@@ -1210,7 +1210,7 @@ _pygi_marshal_in_interface_struct (PyGIInvokeState   *state,
         GValue *value;
         GType object_type;
 
-        object_type = pyg_type_from_object_strict( (PyObject *) py_arg->ob_type, FALSE);
+        object_type = pyg_type_from_object_strict ( (PyObject *) py_arg->ob_type, FALSE);
         if (object_type == G_TYPE_INVALID) {
             PyErr_SetString (PyExc_RuntimeError, "unable to retrieve object's GType");
             return FALSE;
@@ -1225,12 +1225,12 @@ _pygi_marshal_in_interface_struct (PyGIInvokeState   *state,
              * GValue which is freed during the cleanup of
              * invoke.
              */
-            GValue *src = (GValue *)((PyGObject *) py_arg)->obj;
+            GValue *src = (GValue *)( (PyGObject *)py_arg)->obj;
             g_value_init (value, G_VALUE_TYPE (src));
             g_value_copy (src, value);
         } else {
             g_value_init (value, object_type);
-            if (pyg_value_from_pyobject(value, py_arg) < 0) {
+            if (pyg_value_from_pyobject (value, py_arg) < 0) {
                 g_slice_free (GValue, value);
                 PyErr_SetString (PyExc_RuntimeError, "PyObject conversion to GValue failed");
                 return FALSE;
@@ -1241,13 +1241,13 @@ _pygi_marshal_in_interface_struct (PyGIInvokeState   *state,
         return TRUE;
     } else if (iface_cache->is_foreign) {
         gboolean success;
-        success = pygi_struct_foreign_convert_to_g_argument(py_arg,
-                                                            iface_cache->interface_info,
-                                                            arg_cache->transfer,
-                                                            arg);
+        success = pygi_struct_foreign_convert_to_g_argument (py_arg,
+                                                             iface_cache->interface_info,
+                                                             arg_cache->transfer,
+                                                             arg);
 
         return success;
-    } else if (!PyObject_IsInstance(py_arg, iface_cache->py_type)) {
+    } else if (!PyObject_IsInstance (py_arg, iface_cache->py_type)) {
         PyErr_Format (PyExc_TypeError, "Expected %s, but got %s",
                       iface_cache->type_name,
                       iface_cache->py_type->ob_type->tp_name);
@@ -1255,15 +1255,17 @@ _pygi_marshal_in_interface_struct (PyGIInvokeState   *state,
     }
 
     if (g_type_is_a (iface_cache->g_type, G_TYPE_BOXED)) {
-        arg->v_pointer = pyg_boxed_get(py_arg, void);
+        arg->v_pointer = pyg_boxed_get (py_arg, void);
         if (arg_cache->transfer == GI_TRANSFER_EVERYTHING) {
-            arg->v_pointer = g_boxed_copy(iface_cache->g_type, arg->v_pointer);
+            arg->v_pointer = g_boxed_copy (iface_cache->g_type, arg->v_pointer);
         }
     } else if (g_type_is_a (iface_cache->g_type, G_TYPE_POINTER) ||
                iface_cache->g_type  == G_TYPE_NONE) {
-        arg->v_pointer = pyg_pointer_get(py_arg, void);
+        arg->v_pointer = pyg_pointer_get (py_arg, void);
     } else {
-        PyErr_Format (PyExc_NotImplementedError, "structure type '%s' is not supported yet", g_type_name(iface_cache->g_type));
+        PyErr_Format (PyExc_NotImplementedError,
+                      "structure type '%s' is not supported yet",
+                      g_type_name(iface_cache->g_type));
         return FALSE;
     }
     return TRUE;
@@ -1276,8 +1278,8 @@ _pygi_marshal_in_interface_boxed (PyGIInvokeState   *state,
                                   PyObject          *py_arg,
                                   GIArgument        *arg)
 {
-    PyErr_Format(PyExc_NotImplementedError,
-                 "Marshalling for this type is not implemented yet");
+    PyErr_Format (PyExc_NotImplementedError,
+                  "Marshalling for this type is not implemented yet");
     return FALSE;
 }
 
@@ -1293,16 +1295,16 @@ _pygi_marshal_in_interface_object (PyGIInvokeState   *state,
         return TRUE;
     }
 
-    if (!PyObject_IsInstance (py_arg, ((PyGIInterfaceCache *)arg_cache)->py_type)) {
+    if (!PyObject_IsInstance (py_arg, ( (PyGIInterfaceCache *)arg_cache)->py_type)) {
         PyErr_Format (PyExc_TypeError, "Expected %s, but got %s",
-                      ((PyGIInterfaceCache *)arg_cache)->type_name,
-                      ((PyGIInterfaceCache *)arg_cache)->py_type->ob_type->tp_name);
+                      ( (PyGIInterfaceCache *)arg_cache)->type_name,
+                      ( (PyGIInterfaceCache *)arg_cache)->py_type->ob_type->tp_name);
         return FALSE;
     }
 
     arg->v_pointer = pygobject_get(py_arg);
     if (arg_cache->transfer == GI_TRANSFER_EVERYTHING)
-        g_object_ref(arg->v_pointer);
+        g_object_ref (arg->v_pointer);
 
     return TRUE;
 }
@@ -1353,7 +1355,7 @@ gboolean _pygi_marshal_in_interface_instance (PyGIInvokeState   *state,
             break;
         default:
             /* Other types don't have methods. */
-            g_assert_not_reached();
+            g_assert_not_reached ();
    }
 
    return TRUE;
@@ -1371,7 +1373,7 @@ _pygi_marshal_out_void (PyGIInvokeState   *state,
     else
         py_obj = Py_None;
 
-    Py_XINCREF(py_obj);
+    Py_XINCREF (py_obj);
     return py_obj;
 }
 
@@ -1381,7 +1383,7 @@ _pygi_marshal_out_boolean (PyGIInvokeState   *state,
                            PyGIArgCache      *arg_cache,
                            GIArgument        *arg)
 {
-    PyObject *py_obj = PyBool_FromLong(arg->v_boolean);
+    PyObject *py_obj = PyBool_FromLong (arg->v_boolean);
     return py_obj;
 }
 
@@ -1391,7 +1393,7 @@ _pygi_marshal_out_int8 (PyGIInvokeState   *state,
                         PyGIArgCache      *arg_cache,
                         GIArgument        *arg)
 {
-    PyObject *py_obj = PYGLIB_PyLong_FromLong(arg->v_int8);
+    PyObject *py_obj = PYGLIB_PyLong_FromLong (arg->v_int8);
     return py_obj;
 }
 
@@ -1401,7 +1403,7 @@ _pygi_marshal_out_uint8 (PyGIInvokeState   *state,
                          PyGIArgCache      *arg_cache,
                          GIArgument        *arg)
 {
-    PyObject *py_obj =  PYGLIB_PyLong_FromLong(arg->v_uint8);
+    PyObject *py_obj =  PYGLIB_PyLong_FromLong (arg->v_uint8);
 
     return py_obj;
 }
@@ -1412,7 +1414,7 @@ _pygi_marshal_out_int16 (PyGIInvokeState   *state,
                          PyGIArgCache      *arg_cache,
                          GIArgument        *arg)
 {
-    PyObject *py_obj =  PYGLIB_PyLong_FromLong(arg->v_int16);
+    PyObject *py_obj =  PYGLIB_PyLong_FromLong (arg->v_int16);
 
     return py_obj;
 }
@@ -1423,7 +1425,7 @@ _pygi_marshal_out_uint16 (PyGIInvokeState   *state,
                           PyGIArgCache      *arg_cache,
                           GIArgument        *arg)
 {
-    PyObject *py_obj =  PYGLIB_PyLong_FromLong(arg->v_uint16);
+    PyObject *py_obj =  PYGLIB_PyLong_FromLong (arg->v_uint16);
 
     return py_obj;
 }
@@ -1434,7 +1436,7 @@ _pygi_marshal_out_int32 (PyGIInvokeState   *state,
                          PyGIArgCache      *arg_cache,
                          GIArgument        *arg)
 {
-    PyObject *py_obj = PYGLIB_PyLong_FromLong(arg->v_int32);
+    PyObject *py_obj = PYGLIB_PyLong_FromLong (arg->v_int32);
 
     return py_obj;
 }
@@ -1445,7 +1447,7 @@ _pygi_marshal_out_uint32 (PyGIInvokeState   *state,
                           PyGIArgCache      *arg_cache,
                           GIArgument        *arg)
 {
-    PyObject *py_obj = PyLong_FromLongLong(arg->v_uint32);
+    PyObject *py_obj = PyLong_FromLongLong (arg->v_uint32);
 
     return py_obj;
 }
@@ -1456,7 +1458,7 @@ _pygi_marshal_out_int64 (PyGIInvokeState   *state,
                          PyGIArgCache      *arg_cache,
                          GIArgument        *arg)
 {
-    PyObject *py_obj = PyLong_FromLongLong(arg->v_int64);
+    PyObject *py_obj = PyLong_FromLongLong (arg->v_int64);
 
     return py_obj;
 }
@@ -1467,7 +1469,7 @@ _pygi_marshal_out_uint64 (PyGIInvokeState   *state,
                           PyGIArgCache      *arg_cache,
                           GIArgument        *arg)
 {
-    PyObject *py_obj = PyLong_FromUnsignedLongLong(arg->v_uint64);
+    PyObject *py_obj = PyLong_FromUnsignedLongLong (arg->v_uint64);
 
     return py_obj;
 }
@@ -1529,7 +1531,7 @@ _pygi_marshal_out_gtype (PyGIInvokeState   *state,
 {
     PyObject *py_obj = NULL;
 
-    py_obj = pyg_type_wrapper_new( (GType)arg->v_long);
+    py_obj = pyg_type_wrapper_new ( (GType)arg->v_long);
     return py_obj;
 }
 
@@ -1600,17 +1602,17 @@ _pygi_marshal_out_array (PyGIInvokeState   *state,
         if (seq_cache->fixed_size >= 0) {
             len = seq_cache->fixed_size;
         } else if (seq_cache->is_zero_terminated) {
-            len = g_strv_length(arg->v_string);
+            len = g_strv_length (arg->v_string);
         } else {
             GIArgument *len_arg = state->args[seq_cache->len_arg_index];
             len = len_arg->v_long;
         }
 
-        array_ = g_array_new(seq_cache->is_zero_terminated,
-                             FALSE,
-                             seq_cache->item_size);
+        array_ = g_array_new (seq_cache->is_zero_terminated,
+                              FALSE,
+                              seq_cache->item_size);
         if (array_ == NULL) {
-            PyErr_NoMemory();
+            PyErr_NoMemory ();
             return NULL;
         }
 
@@ -1622,7 +1624,7 @@ _pygi_marshal_out_array (PyGIInvokeState   *state,
         if (arg->v_pointer == NULL) {
             py_obj = PYGLIB_PyBytes_FromString ("");
         } else {
-            py_obj = PYGLIB_PyBytes_FromStringAndSize(array_->data, array_->len);
+            py_obj = PYGLIB_PyBytes_FromStringAndSize (array_->data, array_->len);
         }
     } else {
         if (arg->v_pointer == NULL) {
@@ -1634,10 +1636,10 @@ _pygi_marshal_out_array (PyGIInvokeState   *state,
             PyGIMarshalOutFunc item_out_marshaller;
             PyGIArgCache *item_arg_cache;
 
-            py_obj = PyList_New(array_->len);
+            py_obj = PyList_New (array_->len);
             if (py_obj == NULL) {
                 if (seq_cache->array_type == GI_ARRAY_TYPE_C)
-                    g_array_unref(array_);
+                    g_array_unref (array_);
 
                 return NULL;
             }
@@ -1647,7 +1649,7 @@ _pygi_marshal_out_array (PyGIInvokeState   *state,
             is_struct = FALSE;
             if (item_arg_cache->type_tag == GI_TYPE_TAG_INTERFACE) {
                 PyGIInterfaceCache *iface_cache = (PyGIInterfaceCache *)item_arg_cache;
-                switch (g_base_info_get_type(iface_cache->interface_info)) {
+                switch (g_base_info_get_type (iface_cache->interface_info)) {
                     case GI_INFO_TYPE_STRUCT:
                         case GI_INFO_TYPE_BOXED:
                             is_struct = TRUE;
@@ -1656,37 +1658,37 @@ _pygi_marshal_out_array (PyGIInvokeState   *state,
                 }
             }
 
-            item_size = g_array_get_element_size(array_);
+            item_size = g_array_get_element_size (array_);
             for (i = 0; i < array_->len; i++) {
                 GIArgument item_arg;
                 PyObject *py_item;
 
                 if (is_struct) {
-                    item_arg.v_pointer = &_g_array_index(array_, GIArgument, i);
+                    item_arg.v_pointer = &_g_array_index (array_, GIArgument, i);
                 } else {
                     memcpy (&item_arg, &_g_array_index (array_, GIArgument, i), item_size);
                 }
 
-                py_item = item_out_marshaller(state,
-                                              callable_cache,
-                                              item_arg_cache,
-                                              &item_arg);
+                py_item = item_out_marshaller ( state,
+                                                callable_cache,
+                                                item_arg_cache,
+                                               &item_arg);
 
                 if (py_item == NULL) {
-                    Py_CLEAR(py_obj);
+                    Py_CLEAR (py_obj);
 
                     if (seq_cache->array_type == GI_ARRAY_TYPE_C)
-                        g_array_unref(array_);
+                        g_array_unref (array_);
 
                     return NULL;
                 }
-                PyList_SET_ITEM(py_obj, i, py_item);
+                PyList_SET_ITEM (py_obj, i, py_item);
             }
         }
     }
 
     if (seq_cache->array_type == GI_ARRAY_TYPE_C)
-        g_array_free(array_, FALSE);
+        g_array_free (array_, FALSE);
 
     return py_obj;
 }
@@ -1708,9 +1710,9 @@ _pygi_marshal_out_glist (PyGIInvokeState   *state,
     PyObject *py_obj = NULL;
 
     list_ = arg->v_pointer;
-    length = g_list_length(list_);
+    length = g_list_length (list_);
 
-    py_obj = PyList_New(length);
+    py_obj = PyList_New (length);
     if (py_obj == NULL)
         return NULL;
 
@@ -1722,10 +1724,10 @@ _pygi_marshal_out_glist (PyGIInvokeState   *state,
         PyObject *py_item;
 
         item_arg.v_pointer = list_->data;
-        py_item = item_out_marshaller(state,
-                                      callable_cache,
-                                      item_arg_cache,
-                                      &item_arg);
+        py_item = item_out_marshaller ( state,
+                                        callable_cache,
+                                        item_arg_cache,
+                                       &item_arg);
 
         if (py_item == NULL) {
             Py_CLEAR (py_obj);
@@ -1756,9 +1758,9 @@ _pygi_marshal_out_gslist (PyGIInvokeState   *state,
     PyObject *py_obj = NULL;
 
     list_ = arg->v_pointer;
-    length = g_slist_length(list_);
+    length = g_slist_length (list_);
 
-    py_obj = PyList_New(length);
+    py_obj = PyList_New (length);
     if (py_obj == NULL)
         return NULL;
 
@@ -1770,10 +1772,10 @@ _pygi_marshal_out_gslist (PyGIInvokeState   *state,
         PyObject *py_item;
 
         item_arg.v_pointer = list_->data;
-        py_item = item_out_marshaller(state,
-                                      callable_cache,
-                                      item_arg_cache,
-                                      &item_arg);
+        py_item = item_out_marshaller ( state,
+                                        callable_cache,
+                                        item_arg_cache,
+                                       &item_arg);
 
         if (py_item == NULL) {
             Py_CLEAR (py_obj);
@@ -1816,7 +1818,7 @@ _pygi_marshal_out_ghash (PyGIInvokeState   *state,
         return py_obj;
     }
 
-    py_obj = PyDict_New();
+    py_obj = PyDict_New ();
     if (py_obj == NULL)
         return NULL;
 
@@ -1826,28 +1828,28 @@ _pygi_marshal_out_ghash (PyGIInvokeState   *state,
     value_arg_cache = hash_cache->value_cache;
     value_out_marshaller = value_arg_cache->out_marshaller;
 
-    g_hash_table_iter_init(&hash_table_iter, hash_);
-    while (g_hash_table_iter_next(&hash_table_iter,
-                                  &key_arg.v_pointer,
-                                  &value_arg.v_pointer)) {
+    g_hash_table_iter_init (&hash_table_iter, hash_);
+    while (g_hash_table_iter_next (&hash_table_iter,
+                                   &key_arg.v_pointer,
+                                   &value_arg.v_pointer)) {
         PyObject *py_key;
         PyObject *py_value;
         int retval;
 
-        py_key = key_out_marshaller(state,
-                                    callable_cache,
-                                    key_arg_cache,
-                                    &key_arg);
+        py_key = key_out_marshaller ( state,
+                                      callable_cache,
+                                      key_arg_cache,
+                                     &key_arg);
 
         if (py_key == NULL) {
             Py_CLEAR (py_obj);
             return NULL;
         }
 
-        py_value = value_out_marshaller(state,
-                                        callable_cache,
-                                        value_arg_cache,
-                                        &value_arg);
+        py_value = value_out_marshaller ( state,
+                                          callable_cache,
+                                          value_arg_cache,
+                                         &value_arg);
 
         if (py_value == NULL) {
             Py_CLEAR (py_obj);
@@ -1857,11 +1859,11 @@ _pygi_marshal_out_ghash (PyGIInvokeState   *state,
 
         retval = PyDict_SetItem (py_obj, py_key, py_value);
 
-        Py_DECREF(py_key);
-        Py_DECREF(py_value);
+        Py_DECREF (py_key);
+        Py_DECREF (py_value);
 
         if (retval < 0) {
-            Py_CLEAR(py_obj);
+            Py_CLEAR (py_obj);
             return NULL;
         }
     }
@@ -1877,21 +1879,21 @@ _pygi_marshal_out_gerror (PyGIInvokeState   *state,
 {
     PyObject *py_obj = NULL;
 
-    PyErr_Format(PyExc_NotImplementedError,
-                 "Marshalling for gerror out is not implemented");
+    PyErr_Format (PyExc_NotImplementedError,
+                  "Marshalling for gerror out is not implemented");
     return py_obj;
 }
 
 PyObject *
-_pygi_marshal_out_interface_callback(PyGIInvokeState   *state,
-                                     PyGICallableCache *callable_cache,
-                                     PyGIArgCache      *arg_cache,
-                                     GIArgument        *arg)
+_pygi_marshal_out_interface_callback (PyGIInvokeState   *state,
+                                      PyGICallableCache *callable_cache,
+                                      PyGIArgCache      *arg_cache,
+                                      GIArgument        *arg)
 {
     PyObject *py_obj = NULL;
 
-    PyErr_Format(PyExc_NotImplementedError,
-                 "Callback out values are not supported");
+    PyErr_Format (PyExc_NotImplementedError,
+                  "Callback out values are not supported");
     return py_obj;
 }
 
@@ -1907,7 +1909,7 @@ _pygi_marshal_out_interface_enum (PyGIInvokeState   *state,
     if (iface_cache->g_type == G_TYPE_NONE) {
         py_obj = PyObject_CallFunction (iface_cache->py_type, "l", arg->v_long);
     } else {
-        py_obj = pyg_enum_from_gtype(iface_cache->g_type, arg->v_long);
+        py_obj = pyg_enum_from_gtype (iface_cache->g_type, arg->v_long);
     }
     return py_obj;
 }
@@ -1942,7 +1944,7 @@ _pygi_marshal_out_interface_flags (PyGIInvokeState   *state,
         Py_DECREF (py_args);
         Py_DECREF (py_type);
     } else {
-        py_obj = pyg_flags_from_gtype(iface_cache->g_type, arg->v_long);
+        py_obj = pyg_flags_from_gtype (iface_cache->g_type, arg->v_long);
     }
 
     return py_obj;
@@ -1974,9 +1976,9 @@ _pygi_marshal_out_interface_struct (PyGIInvokeState   *state,
                                   arg_cache->transfer == GI_TRANSFER_EVERYTHING);
     } else if (g_type_is_a (type, G_TYPE_POINTER)) {
         if (iface_cache->py_type == NULL ||
-                !PyType_IsSubtype( (PyTypeObject *)iface_cache->py_type, &PyGIStruct_Type)) {
+                !PyType_IsSubtype ( (PyTypeObject *)iface_cache->py_type, &PyGIStruct_Type)) {
             g_warn_if_fail(arg_cache->transfer == GI_TRANSFER_NOTHING);
-            py_obj = pyg_pointer_new(type, arg->v_pointer);
+            py_obj = pyg_pointer_new (type, arg->v_pointer);
         } else {
             py_obj = _pygi_struct_new ( (PyTypeObject *)iface_cache->py_type, arg->v_pointer, 
                                       arg_cache->transfer == GI_TRANSFER_EVERYTHING);
@@ -1984,10 +1986,12 @@ _pygi_marshal_out_interface_struct (PyGIInvokeState   *state,
     } else if (type == G_TYPE_NONE && iface_cache->is_foreign) {
         py_obj = pygi_struct_foreign_convert_from_g_argument (iface_cache->interface_info, arg->v_pointer);
     } else if (type == G_TYPE_NONE) {
-        py_obj = _pygi_struct_new((PyTypeObject *) iface_cache->py_type, arg->v_pointer, 
-                                  arg_cache->transfer == GI_TRANSFER_EVERYTHING);
+        py_obj = _pygi_struct_new ( (PyTypeObject *) iface_cache->py_type, arg->v_pointer, 
+                                   arg_cache->transfer == GI_TRANSFER_EVERYTHING);
     } else {
-        PyErr_Format (PyExc_NotImplementedError, "structure type '%s' is not supported yet", g_type_name (type));
+        PyErr_Format (PyExc_NotImplementedError,
+                      "structure type '%s' is not supported yet",
+                      g_type_name (type));
     }
 
     return py_obj;
@@ -2001,8 +2005,8 @@ _pygi_marshal_out_interface_interface (PyGIInvokeState   *state,
 {
     PyObject *py_obj = NULL;
 
-    PyErr_Format(PyExc_NotImplementedError,
-                 "Marshalling for this type is not implemented yet");
+    PyErr_Format (PyExc_NotImplementedError,
+                  "Marshalling for this type is not implemented yet");
     return py_obj;
 }
 
@@ -2014,8 +2018,8 @@ _pygi_marshal_out_interface_boxed (PyGIInvokeState   *state,
 {
     PyObject *py_obj = NULL;
 
-    PyErr_Format(PyExc_NotImplementedError,
-                 "Marshalling for this type is not implemented yet");
+    PyErr_Format (PyExc_NotImplementedError,
+                  "Marshalling for this type is not implemented yet");
     return py_obj;
 }
 
@@ -2049,8 +2053,7 @@ _pygi_marshal_out_interface_union  (PyGIInvokeState   *state,
 {
     PyObject *py_obj = NULL;
 
-    PyErr_Format(PyExc_NotImplementedError,
-                 "Marshalling for this type is not implemented yet");
+    PyErr_Format (PyExc_NotImplementedError,
+                  "Marshalling for this type is not implemented yet");
     return py_obj;
 }
-



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