GIMarshallingTests: Add more virtual methods with out arguments
authorMartin Pitt <martinpitt@gnome.org>
Wed, 21 Nov 2012 09:25:13 +0000 (10:25 +0100)
committerMartin Pitt <martinpitt@gnome.org>
Wed, 21 Nov 2012 14:13:28 +0000 (15:13 +0100)
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
tests/gimarshallingtests.h

index c92dd10..9a53329 100644 (file)
@@ -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):
  */
index 0e24077..23af6a5 100644 (file)
@@ -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);