remove the flat struct array test and replace with object pointer array test
authorJohn (J5) Palmieri <johnp@redhat.com>
Sat, 13 Aug 2011 13:18:18 +0000 (09:18 -0400)
committerJohn (J5) Palmieri <johnp@redhat.com>
Sat, 13 Aug 2011 13:18:53 +0000 (09:18 -0400)
tests/gimarshallingtests.c
tests/scanner/regress.c
tests/scanner/regress.h

index 814a6c24b56ab6bc31011c606cdcf8c631742887..10330b99a9c3bc7fae0f41dfe1d56da7ac2346c5 100644 (file)
@@ -1179,28 +1179,6 @@ gi_marshalling_tests_array_fixed_out (gint **ints)
     *ints = values;
 }
 
-/**
- * gi_marshalling_tests_array_fixed_out_struct:
- * @structs: (out) (array fixed-size=2) (transfer none):
- */
-void
-gi_marshalling_tests_array_fixed_out_struct (GIMarshallingTestsSimpleStruct **structs)
-{
-    static GIMarshallingTestsSimpleStruct *values;
-
-    if (values == NULL) {
-        values = g_new(GIMarshallingTestsSimpleStruct, 2);
-
-        values[0].long_ = 7;
-        values[0].int8 = 6;
-
-        values[1].long_ = 6;
-        values[1].int8 = 7;
-    }
-
-    *structs = values;
-}
-
 /**
  * gi_marshalling_tests_array_fixed_inout:
  * @ints: (inout) (array fixed-size=4) (transfer none):
index 86927a057cb139e9bc1e130aac6ee1a7485c80e5..13db3a7c314167543908b0502d2046051504c7c2 100644 (file)
@@ -2308,6 +2308,21 @@ regress_test_obj_null_out (RegressTestObj **obj)
     *obj = NULL;
 }
 
+/**
+ * regress_test_array_fixed_out_objects:
+ * @objs: (out) (array fixed-size=2) (transfer full): An array of #RegressTestObj
+ */
+void
+regress_test_array_fixed_out_objects (RegressTestObj ***objs)
+{
+    RegressTestObj **values = g_new(gpointer, 2);
+
+    values[0] = regress_constructor();
+    values[1] = regress_constructor();
+
+    *objs = values;
+}
+
 typedef struct _CallbackInfo CallbackInfo;
 
 struct _CallbackInfo
index 7b8d9de49dadc4e890f739b690460cb0559c9ba7..4c74e098731797b1da95688930d28b57fd81a29e 100644 (file)
@@ -341,6 +341,8 @@ int        regress_test_obj_instance_method (RegressTestObj *obj);
 double     regress_test_obj_static_method (int x);
 void       regress_forced_method (RegressTestObj *obj);
 
+void regress_test_array_fixed_out_objects (RegressTestObj ***objs);
+
 void regress_test_obj_torture_signature_0 (RegressTestObj    *obj,
                                    int        x,
                                    double     *y,