[gobject-introspection] GIMarshallingTests: Add more virtual methods with out arguments



commit 17fc978c081195dad1f6a66d69cc6e18423e6db5
Author: Martin Pitt <martinpitt gnome org>
Date:   Wed Nov 21 10:25:13 2012 +0100

    GIMarshallingTests: Add more virtual methods with out arguments
    
    Add virtuals method which takes both an (in) and and (out) argument, and
    variants with both caller and callee allocation.
    
    This came up in https://bugzilla.gnome.org/show_bug.cgi?id=688783

 tests/gimarshallingtests.c |   32 ++++++++++++++++++++++++++++++++
 tests/gimarshallingtests.h |   23 +++++++++++++++++++++++
 2 files changed, 55 insertions(+), 0 deletions(-)
---
diff --git a/tests/gimarshallingtests.c b/tests/gimarshallingtests.c
index c92dd10..9a53329 100644
--- a/tests/gimarshallingtests.c
+++ b/tests/gimarshallingtests.c
@@ -3941,6 +3941,38 @@ gi_marshalling_tests_object_method_int8_out (GIMarshallingTestsObject *self, gin
 }
 
 /**
+ * gi_marshalling_tests_object_method_int8_arg_and_out_caller:
+ * @out: (out caller-allocates):
+ */
+void
+gi_marshalling_tests_object_method_int8_arg_and_out_caller (GIMarshallingTestsObject *self, gint8 arg, gint8 *out)
+{
+  GI_MARSHALLING_TESTS_OBJECT_GET_CLASS (self)->method_int8_arg_and_out_caller (self, arg, out);
+}
+
+/**
+ * gi_marshalling_tests_object_method_int8_arg_and_out_callee:
+ * @out: (out):
+ */
+void
+gi_marshalling_tests_object_method_int8_arg_and_out_callee (GIMarshallingTestsObject *self, gint8 arg, gint8 **out)
+{
+  GI_MARSHALLING_TESTS_OBJECT_GET_CLASS (self)->method_int8_arg_and_out_callee (self, arg, out);
+}
+
+/**
+ * gi_marshalling_tests_object_method_str_arg_out_ret:
+ * @out: (out caller-allocates):
+ *
+ * Returns: (transfer none)
+ */
+const gchar*
+gi_marshalling_tests_object_method_str_arg_out_ret (GIMarshallingTestsObject *self, const gchar* arg, guint *out)
+{
+  return GI_MARSHALLING_TESTS_OBJECT_GET_CLASS (self)->method_str_arg_out_ret (self, arg, out);
+}
+
+/**
  * gi_marshalling_tests_object_method_with_default_implementation:
  * @in: (in):
  */
diff --git a/tests/gimarshallingtests.h b/tests/gimarshallingtests.h
index 0e24077..23af6a5 100644
--- a/tests/gimarshallingtests.h
+++ b/tests/gimarshallingtests.h
@@ -712,6 +712,26 @@ struct _GIMarshallingTestsObjectClass
     void (* method_int8_out) (GIMarshallingTestsObject *self, gint8 *out);
 
     /**
+     * GIMarshallingTestsObjectClass::method_int8_arg_and_out_caller:
+     * @out: (out caller-allocates):
+     */
+    void (* method_int8_arg_and_out_caller) (GIMarshallingTestsObject *self, gint8 arg, gint8 *out);
+
+    /**
+     * GIMarshallingTestsObjectClass::method_int8_arg_and_out_callee:
+     * @out: (out):
+     */
+    void (* method_int8_arg_and_out_callee) (GIMarshallingTestsObject *self, gint8 arg, gint8 **out);
+
+    /**
+     * GIMarshallingTestsObjectClass::method_str_arg_out_ret:
+     * @out: (out caller-allocates):
+     *
+     * Returns: (transfer none)
+     */
+    const gchar* (* method_str_arg_out_ret) (GIMarshallingTestsObject *self, const gchar* arg, guint *out);
+
+    /**
      * GIMarshallingTestsObjectClass::method_with_default_implementation:
      * @in: (in):
      */
@@ -792,6 +812,9 @@ const gint *gi_marshalling_tests_object_method_array_return (GIMarshallingTestsO
 
 void gi_marshalling_tests_object_method_int8_in (GIMarshallingTestsObject *object, gint8 in);
 void gi_marshalling_tests_object_method_int8_out (GIMarshallingTestsObject *object, gint8 *out);
+void gi_marshalling_tests_object_method_int8_arg_and_out_caller (GIMarshallingTestsObject *object, gint8 arg, gint8 *out);
+void gi_marshalling_tests_object_method_int8_arg_and_out_callee (GIMarshallingTestsObject *object, gint8 arg, gint8 **out);
+const gchar* gi_marshalling_tests_object_method_str_arg_out_ret (GIMarshallingTestsObject *object, const gchar* arg, guint *out);
 void gi_marshalling_tests_object_method_with_default_implementation (GIMarshallingTestsObject *object, gint8 in);
 void gi_marshalling_tests_object_method_variant_array_in (GIMarshallingTestsObject *object, GVariant **in, gsize n_in);
 



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