summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhilip Chimento <philip.chimento@gmail.com>2016-10-14 21:07:46 -0700
committerPhilip Chimento <philip.chimento@gmail.com>2016-10-18 20:15:08 -0700
commit85c25926fba4384e23c64b27d0a2f02d966b4d8e (patch)
treee5de18a8e073ddff13d86b6165e7ec6403cf8e05
parent41b074ba44bb29b405b993b2f4c72b1a66c007c9 (diff)
downloadgobject-introspection-85c25926fba4384e23c64b27d0a2f02d966b4d8e.tar.gz
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
-rw-r--r--tests/gimarshallingtests.c4
-rw-r--r--tests/gimarshallingtests.h4
2 files changed, 4 insertions, 4 deletions
diff --git a/tests/gimarshallingtests.c b/tests/gimarshallingtests.c
index 03dc119d..da8617e9 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 6a7d869d..aa0210c8 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);