[gobject-introspection] gimarshallingtests: Add vfunc with an array output



commit 6ad132c69c74f46f54d770835ea45e8a58fbd612
Author: Paolo Borelli <pborelli gnome org>
Date:   Thu Jan 10 22:23:36 2013 +0100

    gimarshallingtests: Add vfunc with an array output
    
    Add vfunc_array_out_param to GIMarshallingTestsObjectClass.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=690851

 tests/gimarshallingtests.c |   13 +++++++++++++
 tests/gimarshallingtests.h |    7 +++++++
 2 files changed, 20 insertions(+), 0 deletions(-)
---
diff --git a/tests/gimarshallingtests.c b/tests/gimarshallingtests.c
index 95bb196..d4b6cb3 100644
--- a/tests/gimarshallingtests.c
+++ b/tests/gimarshallingtests.c
@@ -4239,6 +4239,19 @@ gi_marshalling_tests_object_vfunc_caller_allocated_out_parameter (GIMarshallingT
 }
 
 /**
+ * gi_marshalling_tests_object_vfunc_array_out_parameter:
+ * @a: (out) (array zero-terminated=1):
+ */
+void
+gi_marshalling_tests_object_vfunc_array_out_parameter (GIMarshallingTestsObject *self, gfloat **a)
+{
+    /* make sure that local variables don't get smashed */
+    gulong local = 0x12345678;
+    GI_MARSHALLING_TESTS_OBJECT_GET_CLASS (self)->vfunc_array_out_parameter (self, a);
+    g_assert_cmpint(local, ==, 0x12345678);
+}
+
+/**
  * gi_marshalling_tests_object_vfunc_return_value_and_one_out_parameter:
  * @a: (out):
  */
diff --git a/tests/gimarshallingtests.h b/tests/gimarshallingtests.h
index e4875d6..03d165b 100644
--- a/tests/gimarshallingtests.h
+++ b/tests/gimarshallingtests.h
@@ -778,6 +778,12 @@ struct _GIMarshallingTestsObjectClass
     void  (* vfunc_caller_allocated_out_parameter) (GIMarshallingTestsObject *self, GValue *a);
 
     /**
+     * GIMarshallingTestsObjectClass::vfunc_array_out_parameter:
+     * @a: (out) (array zero-terminated=1):
+     */
+    void  (* vfunc_array_out_parameter) (GIMarshallingTestsObject *self, gfloat **a);
+
+    /**
      * GIMarshallingTestsObjectClass::vfunc_return_value_and_one_out_parameter:
      * @a: (out):
      */
@@ -828,6 +834,7 @@ glong gi_marshalling_tests_object_vfunc_return_value_only (GIMarshallingTestsObj
 void gi_marshalling_tests_object_vfunc_one_out_parameter (GIMarshallingTestsObject *self, gfloat *a);
 void gi_marshalling_tests_object_vfunc_multiple_out_parameters (GIMarshallingTestsObject *self, gfloat *a, gfloat *b);
 void gi_marshalling_tests_object_vfunc_caller_allocated_out_parameter (GIMarshallingTestsObject *self, GValue *a);
+void gi_marshalling_tests_object_vfunc_array_out_parameter (GIMarshallingTestsObject *self, gfloat **a);
 glong gi_marshalling_tests_object_vfunc_return_value_and_one_out_parameter (GIMarshallingTestsObject *self, glong *a);
 glong gi_marshalling_tests_object_vfunc_return_value_and_multiple_out_parameters (GIMarshallingTestsObject *self, glong *a, glong *b);
 gboolean gi_marshalling_tests_object_vfunc_meth_with_error (GIMarshallingTestsObject *object, gint x, GError **error);



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