[gobject-introspection] Add a test function with an out argument and some other after that



commit f54d77691361fb708a01a1f237e605cbd3aedbd6
Author: Johan Bilien <jobi litl com>
Date:   Mon Mar 1 17:32:32 2010 -0500

    Add a test function with an out argument and some other after that
    
    Useful to debug case https://bugzilla.gnome.org/show_bug.cgi?id=611529

 gir/Everything-1.0-expected.gir |   13 +++++++++++++
 gir/everything.c                |   13 +++++++++++++
 gir/everything.h                |    3 +++
 3 files changed, 29 insertions(+), 0 deletions(-)
---
diff --git a/gir/Everything-1.0-expected.gir b/gir/Everything-1.0-expected.gir
index 145a9c9..9453090 100644
--- a/gir/Everything-1.0-expected.gir
+++ b/gir/Everything-1.0-expected.gir
@@ -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"/>
diff --git a/gir/everything.c b/gir/everything.c
index f968bbe..6c394e8 100644
--- a/gir/everything.c
+++ b/gir/everything.c
@@ -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 */
 
diff --git a/gir/everything.h b/gir/everything.h
index 8b18903..84e2fe2 100644
--- a/gir/everything.h
+++ b/gir/everything.h
@@ -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);



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