Add two tests in Everything regarding multiple output arguments
authorSimon van der Linden <svdlinden@src.gnome.org>
Wed, 24 Jun 2009 15:01:21 +0000 (17:01 +0200)
committerSimon van der Linden <svdlinden@src.gnome.org>
Wed, 24 Jun 2009 15:07:43 +0000 (17:07 +0200)
Add test_utf8_out_out and test_utf8_out_nonconst_return in Everything to
test the return of more than one value in a tuple in dynamic bindings.

http://bugzilla.gnome.org/show_bug.cgi?id=585368

gir/everything.c
gir/everything.h

index 5e5bed8..674a0c2 100644 (file)
@@ -257,6 +257,35 @@ GSList *test_filename_return (void)
   return filenames;
 }
 
+
+/* multiple output arguments */
+
+/**
+ * test_utf8_out_out:
+ * @out0: (out) (transfer full): a copy of "first"
+ * @out1: (out) (transfer full): a copy of "second"
+ */
+void
+test_utf8_out_out (char **out0, char **out1)
+{
+  *out0 = g_strdup ("first");
+  *out1 = g_strdup ("second");
+}
+
+/**
+ * test_utf8_out_nonconst_return:
+ * @out: (out) (transfer full): a copy of "second"
+ *
+ * Returns: (transfer full): a copy of "first"
+ */
+char *
+test_utf8_out_nonconst_return (char **out)
+{
+  *out = g_strdup ("second");
+  return g_strdup ("first");
+}
+
+
 /* non-basic-types */
 
 static const char *test_sequence[] = {"1", "2", "3"};
index 88f91f2..a7d2322 100644 (file)
@@ -36,6 +36,10 @@ void test_utf8_out (char **out);
 void test_utf8_inout (char **inout);
 GSList *test_filename_return (void);
 
+/* multiple output arguments */
+void test_utf8_out_out (char **out0, char **out1);
+char *test_utf8_out_nonconst_return (char **out);
+
 /* non-basic-types */
 /* array */
 gboolean test_strv_in (char **arr);