summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin Pitt <martinpitt@gnome.org>2012-11-21 10:25:13 +0100
committerMartin Pitt <martinpitt@gnome.org>2012-11-21 15:13:28 +0100
commit17fc978c081195dad1f6a66d69cc6e18423e6db5 (patch)
treeeae5d98b67a74feb40ee6b60e521922ad9db3c9b
parent21cec56f5aa24bf1288a6ef3ecd2d1d168bff827 (diff)
downloadgobject-introspection-17fc978c081195dad1f6a66d69cc6e18423e6db5.tar.gz
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
-rw-r--r--tests/gimarshallingtests.c32
-rw-r--r--tests/gimarshallingtests.h23
2 files changed, 55 insertions, 0 deletions
diff --git a/tests/gimarshallingtests.c b/tests/gimarshallingtests.c
index c92dd10f..9a533293 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 0e240773..23af6a52 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);