[gobject-introspection] tests: const specifier for transfer-none out array



commit 85c25926fba4384e23c64b27d0a2f02d966b4d8e
Author: Philip Chimento <philip chimento gmail com>
Date:   Fri Oct 14 21:07:46 2016 -0700

    tests: const specifier for transfer-none out array
    
    Since we return a static const array as the out value, the function must
    have a const type for its out parameter.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=772790

 tests/gimarshallingtests.c |    4 ++--
 tests/gimarshallingtests.h |    4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)
---
diff --git a/tests/gimarshallingtests.c b/tests/gimarshallingtests.c
index 03dc119..da8617e 100644
--- a/tests/gimarshallingtests.c
+++ b/tests/gimarshallingtests.c
@@ -1586,7 +1586,7 @@ gi_marshalling_tests_array_out_etc (gint first, gint **ints, gint *length, gint
  * @bools: (out) (array length=length) (transfer none):
  */
 void
-gi_marshalling_tests_array_bool_out (gboolean **bools, gint *length)
+gi_marshalling_tests_array_bool_out (const gboolean **bools, gint *length)
 {
   static const gboolean values[] = { TRUE, FALSE, TRUE, TRUE };
 
@@ -1599,7 +1599,7 @@ gi_marshalling_tests_array_bool_out (gboolean **bools, gint *length)
  * @chars: (out) (array length=length) (transfer none):
  */
 void
-gi_marshalling_tests_array_unichar_out (gunichar **chars, gint *length)
+gi_marshalling_tests_array_unichar_out (const gunichar **chars, gint *length)
 {
   static const gunichar values[] = GI_MARSHALLING_TESTS_CONSTANT_UCS4;
   *length = 12;
diff --git a/tests/gimarshallingtests.h b/tests/gimarshallingtests.h
index 6a7d869..aa0210c 100644
--- a/tests/gimarshallingtests.h
+++ b/tests/gimarshallingtests.h
@@ -762,10 +762,10 @@ _GI_TEST_EXTERN
 void gi_marshalling_tests_array_out_etc (gint first, gint **ints, gint *length, gint last, gint *sum);
 
 _GI_TEST_EXTERN
-void gi_marshalling_tests_array_bool_out (gboolean **bools, gint *length);
+void gi_marshalling_tests_array_bool_out (const gboolean **bools, gint *length);
 
 _GI_TEST_EXTERN
-void gi_marshalling_tests_array_unichar_out (gunichar **chars, gint *length);
+void gi_marshalling_tests_array_unichar_out (const gunichar **chars, gint *length);
 
 _GI_TEST_EXTERN
 void gi_marshalling_tests_array_inout (gint **ints, gint *length);


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