diff options
-rw-r--r-- | tests/gimarshallingtests.c | 30 | ||||
-rw-r--r-- | tests/gimarshallingtests.h | 6 |
2 files changed, 36 insertions, 0 deletions
diff --git a/tests/gimarshallingtests.c b/tests/gimarshallingtests.c index 5d0caea4..2072b9f2 100644 --- a/tests/gimarshallingtests.c +++ b/tests/gimarshallingtests.c @@ -1205,6 +1205,19 @@ gi_marshalling_tests_array_fixed_int_in (const gint *ints) } /** + * gi_marshalling_tests_array_fixed_caller_allocated_out: + * @ints: (out caller-allocates) (array fixed-size=4): + */ +void +gi_marshalling_tests_array_fixed_caller_allocated_out (gint *ints) +{ + ints[0] = -1; + ints[1] = 0; + ints[2] = 1; + ints[3] = 2; +} + +/** * gi_marshalling_tests_array_fixed_short_in: * @shorts: (array fixed-size=4): */ @@ -1252,6 +1265,23 @@ gi_marshalling_tests_array_fixed_out_struct (GIMarshallingTestsSimpleStruct **st } /** + * gi_marshalling_tests_array_fixed_caller_allocated_struct_out: + * @structs: (out caller-allocates) (array fixed-size=4): + */ +void +gi_marshalling_tests_array_fixed_caller_allocated_struct_out (GIMarshallingTestsSimpleStruct *structs) +{ + structs[0].long_ = -2; + structs[0].int8 = -1; + structs[1].long_ = 1; + structs[1].int8 = 2; + structs[2].long_ = 3; + structs[2].int8 = 4; + structs[3].long_ = 5; + structs[3].int8 = 6; +} + +/** * gi_marshalling_tests_array_fixed_inout: * @ints: (inout) (array fixed-size=4) (transfer none): */ diff --git a/tests/gimarshallingtests.h b/tests/gimarshallingtests.h index 2f4b259b..d4901987 100644 --- a/tests/gimarshallingtests.h +++ b/tests/gimarshallingtests.h @@ -679,6 +679,9 @@ _GI_TEST_EXTERN void gi_marshalling_tests_array_fixed_int_in (const gint *ints); _GI_TEST_EXTERN +void gi_marshalling_tests_array_fixed_caller_allocated_out (gint *ints); + +_GI_TEST_EXTERN void gi_marshalling_tests_array_fixed_short_in (const gshort *shorts); @@ -689,6 +692,9 @@ void gi_marshalling_tests_array_fixed_out (gint **ints); _GI_TEST_EXTERN void gi_marshalling_tests_array_fixed_out_struct (GIMarshallingTestsSimpleStruct **structs); +_GI_TEST_EXTERN +void gi_marshalling_tests_array_fixed_caller_allocated_struct_out (GIMarshallingTestsSimpleStruct *structs); + _GI_TEST_EXTERN void gi_marshalling_tests_array_fixed_inout (gint **ints); |