Add a test function with an out argument and some other after that
authorJohan Bilien <jobi@litl.com>
Mon, 1 Mar 2010 22:32:32 +0000 (17:32 -0500)
committerJohan Bilien <jobi@litl.com>
Mon, 1 Mar 2010 22:32:32 +0000 (17:32 -0500)
Useful to debug case https://bugzilla.gnome.org/show_bug.cgi?id=611529

gir/Everything-1.0-expected.gir
gir/everything.c
gir/everything.h

index 145a9c9..9453090 100644 (file)
@@ -1220,6 +1220,19 @@ call and can be released on return.">
         </parameter>
       </parameters>
     </function>
+    <function name="test_int_out_utf8" c:identifier="test_int_out_utf8">
+      <return-value transfer-ownership="none">
+        <type name="none" c:type="void"/>
+      </return-value>
+      <parameters>
+        <parameter name="length" direction="out" transfer-ownership="full">
+          <type name="int" c:type="int*"/>
+        </parameter>
+        <parameter name="in" transfer-ownership="none">
+          <type name="utf8" c:type="char*"/>
+        </parameter>
+      </parameters>
+    </function>
     <function name="test_int_value_arg" c:identifier="test_int_value_arg">
       <return-value transfer-ownership="none">
         <type name="int" c:type="int"/>
index f968bbe..6c394e8 100644 (file)
@@ -257,6 +257,19 @@ GSList *test_filename_return (void)
   return filenames;
 }
 
+/* in arguments after out arguments */
+
+/**
+ * test_int_out_utf8:
+ * @out: (out):
+ * @in:
+ */
+void
+test_int_out_utf8 (int *length, const char *in)
+{
+    *length = g_utf8_strlen(in, -1);
+}
+
 
 /* multiple output arguments */
 
index 8b18903..84e2fe2 100644 (file)
@@ -36,6 +36,9 @@ void test_utf8_out (char **out);
 void test_utf8_inout (char **inout);
 GSList *test_filename_return (void);
 
+/* in arguments after out arguments */
+void test_int_out_utf8 (int *length, const char *in);
+
 /* multiple output arguments */
 void test_multi_double_args (gdouble in, gdouble *one, gdouble *two);
 void test_utf8_out_out (char **out0, char **out1);