[gobject-introspection] test/gimarshallingtests.c: Fix build on C89 compilers



commit 3a549931dff89f2b1885829386198005a207d29b
Author: Chun-wei Fan <fanchunwei src gnome org>
Date:   Fri Feb 22 17:40:00 2013 +0800

    test/gimarshallingtests.c: Fix build on C89 compilers
    
    https://bugzilla.gnome.org/show_bug.cgi?id=694426

 tests/gimarshallingtests.c |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)
---
diff --git a/tests/gimarshallingtests.c b/tests/gimarshallingtests.c
index 2e1279a..4f4be61 100644
--- a/tests/gimarshallingtests.c
+++ b/tests/gimarshallingtests.c
@@ -4402,9 +4402,10 @@ void
 gi_marshalling_tests_object_get_ref_info_for_vfunc_in_object_transfer_none (GIMarshallingTestsObject *self, 
GType type, guint *ref_count, gboolean *is_floating)
 {
     static gboolean destroy_called;
+    GObject *object;
     destroy_called = FALSE;
 
-    GObject *object = g_object_new(type, NULL);
+    object = g_object_new(type, NULL);
     g_object_weak_ref (object, (GWeakNotify)_vfunc_in_object_destroy_callback, &destroy_called);
 
     GI_MARSHALLING_TESTS_OBJECT_GET_CLASS (self)->vfunc_in_object_transfer_none (self, object);
@@ -4429,9 +4430,10 @@ void
 gi_marshalling_tests_object_get_ref_info_for_vfunc_in_object_transfer_full (GIMarshallingTestsObject *self, 
GType type, guint *ref_count, gboolean *is_floating)
 {
     static gboolean destroy_called;
+    GObject *object;
     destroy_called = FALSE;
 
-    GObject *object = g_object_new(type, NULL);
+    object = g_object_new(type, NULL);
     g_object_weak_ref (object, (GWeakNotify)_vfunc_in_object_destroy_callback, &destroy_called);
 
     /* Calling the vfunc takes ownership of the object, so we use a weak_ref to determine


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