From 5287a96a48c487866994353de9d1ac96b98f16e3 Mon Sep 17 00:00:00 2001 From: Martin Pitt Date: Thu, 11 Oct 2012 16:05:37 +0200 Subject: gimarshallingtests: Add array/GList uint32/64 in/out API Add in/out API for testing arrays containing uint64, as well as GList containing uint32 (GList and GHash can't contain 64 bit values as they store them in pointers). https://bugzilla.gnome.org/show_bug.cgi?id=685860 --- tests/gimarshallingtests.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'tests/gimarshallingtests.h') diff --git a/tests/gimarshallingtests.h b/tests/gimarshallingtests.h index cdcb08e6..7768a881 100644 --- a/tests/gimarshallingtests.h +++ b/tests/gimarshallingtests.h @@ -422,11 +422,13 @@ GVariant **gi_marshalling_tests_array_gvariant_full_in (GVariant **variants); /* GArray */ GArray *gi_marshalling_tests_garray_int_none_return (void); +GArray *gi_marshalling_tests_garray_uint64_none_return (void); GArray *gi_marshalling_tests_garray_utf8_none_return (void); GArray *gi_marshalling_tests_garray_utf8_container_return (void); GArray *gi_marshalling_tests_garray_utf8_full_return (void); void gi_marshalling_tests_garray_int_none_in (GArray *array_); +void gi_marshalling_tests_garray_uint64_none_in (GArray *array_); void gi_marshalling_tests_garray_utf8_none_in (GArray *array_); void gi_marshalling_tests_garray_utf8_none_out (GArray **array_); @@ -467,11 +469,13 @@ void gi_marshalling_tests_gstrv_inout (GStrv *g_strv); /* GList */ GList *gi_marshalling_tests_glist_int_none_return (void); +GList *gi_marshalling_tests_glist_uint32_none_return (void); GList *gi_marshalling_tests_glist_utf8_none_return (void); GList *gi_marshalling_tests_glist_utf8_container_return (void); GList *gi_marshalling_tests_glist_utf8_full_return (void); void gi_marshalling_tests_glist_int_none_in (GList *list); +void gi_marshalling_tests_glist_uint32_none_in (GList *list); void gi_marshalling_tests_glist_utf8_none_in (GList *list); void gi_marshalling_tests_glist_utf8_none_out (GList **list); -- cgit v1.2.1 From b0fccfbf26536817b39b30b3a5b9c01e2cc2c5c5 Mon Sep 17 00:00:00 2001 From: Colin Walters Date: Sat, 27 Oct 2012 12:53:52 -0400 Subject: gmarshallingtests: Fix prototype () -> (void) Dear Python programmers, () doesn't mean what you think it means in C. --- tests/gimarshallingtests.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'tests/gimarshallingtests.h') diff --git a/tests/gimarshallingtests.h b/tests/gimarshallingtests.h index 7768a881..b1276bb8 100644 --- a/tests/gimarshallingtests.h +++ b/tests/gimarshallingtests.h @@ -961,7 +961,7 @@ void gi_marshalling_tests_gerror_out_transfer_none(GError **err, const gchar **d GError *gi_marshalling_tests_gerror_return(void); /* GParamSpec */ -GParamSpec *gi_marshalling_tests_param_spec_return(); +GParamSpec *gi_marshalling_tests_param_spec_return (void); void gi_marshalling_tests_param_spec_out(GParamSpec **param); /* Overrides */ -- cgit v1.2.1 From 13f9d941f5a03c899be2c4c08455f30b8ced9ce2 Mon Sep 17 00:00:00 2001 From: Colin Walters Date: Sat, 27 Oct 2012 12:54:34 -0400 Subject: gimarshallingtests: Attempt to avoid using reserved words "int8" apparently blows up on AIX. It was kind of lame how we would just ad-hoc append a _. Since we only have one value for a lot of these, let's just go with the couldn't-be-any-simpler "v". https://bugzilla.gnome.org/show_bug.cgi?id=664166 --- tests/gimarshallingtests.h | 132 ++++++++++++++++++++++----------------------- 1 file changed, 66 insertions(+), 66 deletions(-) (limited to 'tests/gimarshallingtests.h') diff --git a/tests/gimarshallingtests.h b/tests/gimarshallingtests.h index b1276bb8..73401eee 100644 --- a/tests/gimarshallingtests.h +++ b/tests/gimarshallingtests.h @@ -21,14 +21,14 @@ typedef struct _GIMarshallingTestsBoxedStruct GIMarshallingTestsBoxedStruct; gboolean gi_marshalling_tests_boolean_return_true (void); gboolean gi_marshalling_tests_boolean_return_false (void); -void gi_marshalling_tests_boolean_in_true (gboolean bool_); -void gi_marshalling_tests_boolean_in_false (gboolean bool_); +void gi_marshalling_tests_boolean_in_true (gboolean v); +void gi_marshalling_tests_boolean_in_false (gboolean v); -void gi_marshalling_tests_boolean_out_true (gboolean *bool_); -void gi_marshalling_tests_boolean_out_false (gboolean *bool_); +void gi_marshalling_tests_boolean_out_true (gboolean *v); +void gi_marshalling_tests_boolean_out_false (gboolean *v); -void gi_marshalling_tests_boolean_inout_true_false (gboolean *bool_); -void gi_marshalling_tests_boolean_inout_false_true (gboolean *bool_); +void gi_marshalling_tests_boolean_inout_true_false (gboolean *v); +void gi_marshalling_tests_boolean_inout_false_true (gboolean *v); /* Integers */ @@ -36,85 +36,85 @@ void gi_marshalling_tests_boolean_inout_false_true (gboolean *bool_); gint8 gi_marshalling_tests_int8_return_max (void); gint8 gi_marshalling_tests_int8_return_min (void); -void gi_marshalling_tests_int8_in_max (gint8 int8); -void gi_marshalling_tests_int8_in_min (gint8 int8); +void gi_marshalling_tests_int8_in_max (gint8 v); +void gi_marshalling_tests_int8_in_min (gint8 v); -void gi_marshalling_tests_int8_out_max (gint8 *int8); -void gi_marshalling_tests_int8_out_min (gint8 *int8); +void gi_marshalling_tests_int8_out_max (gint8 *v); +void gi_marshalling_tests_int8_out_min (gint8 *v); -void gi_marshalling_tests_int8_inout_max_min (gint8 *int8); -void gi_marshalling_tests_int8_inout_min_max (gint8 *int8); +void gi_marshalling_tests_int8_inout_max_min (gint8 *v); +void gi_marshalling_tests_int8_inout_min_max (gint8 *v); guint8 gi_marshalling_tests_uint8_return (void); -void gi_marshalling_tests_uint8_in (guint8 uint8); +void gi_marshalling_tests_uint8_in (guint8 v); -void gi_marshalling_tests_uint8_out (guint8 *uint8); -void gi_marshalling_tests_uint8_inout (guint8 *uint8); +void gi_marshalling_tests_uint8_out (guint8 *v); +void gi_marshalling_tests_uint8_inout (guint8 *v); gint16 gi_marshalling_tests_int16_return_max (void); gint16 gi_marshalling_tests_int16_return_min (void); -void gi_marshalling_tests_int16_in_max (gint16 int16); -void gi_marshalling_tests_int16_in_min (gint16 int16); +void gi_marshalling_tests_int16_in_max (gint16 v); +void gi_marshalling_tests_int16_in_min (gint16 v); -void gi_marshalling_tests_int16_out_max (gint16 *int16); -void gi_marshalling_tests_int16_out_min (gint16 *int16); +void gi_marshalling_tests_int16_out_max (gint16 *v); +void gi_marshalling_tests_int16_out_min (gint16 *v); -void gi_marshalling_tests_int16_inout_max_min (gint16 *int16); -void gi_marshalling_tests_int16_inout_min_max (gint16 *int16); +void gi_marshalling_tests_int16_inout_max_min (gint16 *v); +void gi_marshalling_tests_int16_inout_min_max (gint16 *v); guint16 gi_marshalling_tests_uint16_return (void); -void gi_marshalling_tests_uint16_in (guint16 uint16); +void gi_marshalling_tests_uint16_in (guint16 v); -void gi_marshalling_tests_uint16_out (guint16 *uint16); -void gi_marshalling_tests_uint16_inout (guint16 *uint16); +void gi_marshalling_tests_uint16_out (guint16 *v); +void gi_marshalling_tests_uint16_inout (guint16 *v); gint32 gi_marshalling_tests_int32_return_max (void); gint32 gi_marshalling_tests_int32_return_min (void); -void gi_marshalling_tests_int32_in_max (gint32 int32); -void gi_marshalling_tests_int32_in_min (gint32 int32); +void gi_marshalling_tests_int32_in_max (gint32 v); +void gi_marshalling_tests_int32_in_min (gint32 v); -void gi_marshalling_tests_int32_out_max (gint32 *int32); -void gi_marshalling_tests_int32_out_min (gint32 *int32); +void gi_marshalling_tests_int32_out_max (gint32 *v); +void gi_marshalling_tests_int32_out_min (gint32 *v); -void gi_marshalling_tests_int32_inout_max_min (gint32 *int32); -void gi_marshalling_tests_int32_inout_min_max (gint32 *int32); +void gi_marshalling_tests_int32_inout_max_min (gint32 *v); +void gi_marshalling_tests_int32_inout_min_max (gint32 *v); guint32 gi_marshalling_tests_uint32_return (void); -void gi_marshalling_tests_uint32_in (guint32 uint32); +void gi_marshalling_tests_uint32_in (guint32 v); -void gi_marshalling_tests_uint32_out (guint32 *uint32); -void gi_marshalling_tests_uint32_inout (guint32 *uint32); +void gi_marshalling_tests_uint32_out (guint32 *v); +void gi_marshalling_tests_uint32_inout (guint32 *v); gint64 gi_marshalling_tests_int64_return_max (void); gint64 gi_marshalling_tests_int64_return_min (void); -void gi_marshalling_tests_int64_in_max (gint64 int64); -void gi_marshalling_tests_int64_in_min (gint64 int64); +void gi_marshalling_tests_int64_in_max (gint64 v); +void gi_marshalling_tests_int64_in_min (gint64 v); -void gi_marshalling_tests_int64_out_max (gint64 *int64); -void gi_marshalling_tests_int64_out_min (gint64 *int64); +void gi_marshalling_tests_int64_out_max (gint64 *v); +void gi_marshalling_tests_int64_out_min (gint64 *v); -void gi_marshalling_tests_int64_inout_max_min (gint64 *int64); -void gi_marshalling_tests_int64_inout_min_max (gint64 *int64); +void gi_marshalling_tests_int64_inout_max_min (gint64 *v); +void gi_marshalling_tests_int64_inout_min_max (gint64 *v); guint64 gi_marshalling_tests_uint64_return (void); -void gi_marshalling_tests_uint64_in (guint64 uint64); +void gi_marshalling_tests_uint64_in (guint64 v); -void gi_marshalling_tests_uint64_out (guint64 *uint64); -void gi_marshalling_tests_uint64_inout (guint64 *uint64); +void gi_marshalling_tests_uint64_out (guint64 *v); +void gi_marshalling_tests_uint64_inout (guint64 *v); gshort gi_marshalling_tests_short_return_max (void); @@ -205,31 +205,31 @@ void gi_marshalling_tests_size_inout (gsize *size); gfloat gi_marshalling_tests_float_return (void); -void gi_marshalling_tests_float_in (gfloat float_); +void gi_marshalling_tests_float_in (gfloat v); -void gi_marshalling_tests_float_out (gfloat *float_); +void gi_marshalling_tests_float_out (gfloat *v); -void gi_marshalling_tests_float_inout (gfloat *float_); +void gi_marshalling_tests_float_inout (gfloat *v); gdouble gi_marshalling_tests_double_return (void); -void gi_marshalling_tests_double_in (gdouble double_); +void gi_marshalling_tests_double_in (gdouble v); -void gi_marshalling_tests_double_out (gdouble *double_); +void gi_marshalling_tests_double_out (gdouble *v); -void gi_marshalling_tests_double_inout (gdouble *double_); +void gi_marshalling_tests_double_inout (gdouble *v); /* Timestamps */ time_t gi_marshalling_tests_time_t_return (void); -void gi_marshalling_tests_time_t_in (time_t time_t_); +void gi_marshalling_tests_time_t_in (time_t v); -void gi_marshalling_tests_time_t_out (time_t *time_t_); +void gi_marshalling_tests_time_t_out (time_t *v); -void gi_marshalling_tests_time_t_inout (time_t *time_t_); +void gi_marshalling_tests_time_t_inout (time_t *v); /* GType */ @@ -284,11 +284,11 @@ typedef enum GIMarshallingTestsEnum gi_marshalling_tests_enum_returnv (void); -void gi_marshalling_tests_enum_in (GIMarshallingTestsEnum enum_); +void gi_marshalling_tests_enum_in (GIMarshallingTestsEnum v); -void gi_marshalling_tests_enum_out (GIMarshallingTestsEnum *enum_); +void gi_marshalling_tests_enum_out (GIMarshallingTestsEnum *v); -void gi_marshalling_tests_enum_inout (GIMarshallingTestsEnum *enum_); +void gi_marshalling_tests_enum_inout (GIMarshallingTestsEnum *v); /* GEnum */ @@ -305,11 +305,11 @@ GType gi_marshalling_tests_genum_get_type (void) G_GNUC_CONST; GIMarshallingTestsEnum gi_marshalling_tests_genum_returnv (void); -void gi_marshalling_tests_genum_in (GIMarshallingTestsGEnum enum_); +void gi_marshalling_tests_genum_in (GIMarshallingTestsGEnum v); -void gi_marshalling_tests_genum_out (GIMarshallingTestsGEnum *enum_); +void gi_marshalling_tests_genum_out (GIMarshallingTestsGEnum *v); -void gi_marshalling_tests_genum_inout (GIMarshallingTestsGEnum *enum_); +void gi_marshalling_tests_genum_inout (GIMarshallingTestsGEnum *v); /* GFlags */ @@ -329,12 +329,12 @@ GType gi_marshalling_tests_flags_get_type (void) G_GNUC_CONST; GIMarshallingTestsFlags gi_marshalling_tests_flags_returnv (void); -void gi_marshalling_tests_flags_in (GIMarshallingTestsFlags flags_); -void gi_marshalling_tests_flags_in_zero (GIMarshallingTestsFlags flags); +void gi_marshalling_tests_flags_in (GIMarshallingTestsFlags v); +void gi_marshalling_tests_flags_in_zero (GIMarshallingTestsFlags v); -void gi_marshalling_tests_flags_out (GIMarshallingTestsFlags *flags_); +void gi_marshalling_tests_flags_out (GIMarshallingTestsFlags *v); -void gi_marshalling_tests_flags_inout (GIMarshallingTestsFlags *flags_); +void gi_marshalling_tests_flags_inout (GIMarshallingTestsFlags *v); /* Flags with no GType */ @@ -350,12 +350,12 @@ typedef enum GIMarshallingTestsNoTypeFlags gi_marshalling_tests_no_type_flags_returnv (void); -void gi_marshalling_tests_no_type_flags_in (GIMarshallingTestsNoTypeFlags flags_); -void gi_marshalling_tests_no_type_flags_in_zero (GIMarshallingTestsNoTypeFlags flags); +void gi_marshalling_tests_no_type_flags_in (GIMarshallingTestsNoTypeFlags v); +void gi_marshalling_tests_no_type_flags_in_zero (GIMarshallingTestsNoTypeFlags v); -void gi_marshalling_tests_no_type_flags_out (GIMarshallingTestsNoTypeFlags *flags_); +void gi_marshalling_tests_no_type_flags_out (GIMarshallingTestsNoTypeFlags *v); -void gi_marshalling_tests_no_type_flags_inout (GIMarshallingTestsNoTypeFlags *flags_); +void gi_marshalling_tests_no_type_flags_inout (GIMarshallingTestsNoTypeFlags *v); /* Arrays */ @@ -457,7 +457,7 @@ void gi_marshalling_tests_gptrarray_utf8_full_inout (GPtrArray **parray_); /* GByteArray */ GByteArray *gi_marshalling_tests_bytearray_full_return (void); -void gi_marshalling_tests_bytearray_none_in (GByteArray* array_); +void gi_marshalling_tests_bytearray_none_in (GByteArray* v); /* GStrv */ -- cgit v1.2.1 From af24c2bf8d07393904c537c0da6eb4481feb84bd Mon Sep 17 00:00:00 2001 From: Colin Walters Date: Mon, 5 Nov 2012 18:13:24 -0500 Subject: gimarshallingtests: Add some GBytes tests Will be used by gjs for new byte array work. https://bugzilla.gnome.org/show_bug.cgi?id=687696 --- tests/gimarshallingtests.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'tests/gimarshallingtests.h') diff --git a/tests/gimarshallingtests.h b/tests/gimarshallingtests.h index 73401eee..1b5d7ce2 100644 --- a/tests/gimarshallingtests.h +++ b/tests/gimarshallingtests.h @@ -459,6 +459,11 @@ void gi_marshalling_tests_gptrarray_utf8_full_inout (GPtrArray **parray_); GByteArray *gi_marshalling_tests_bytearray_full_return (void); void gi_marshalling_tests_bytearray_none_in (GByteArray* v); +/* GBytes */ + +GBytes *gi_marshalling_tests_gbytes_full_return (void); +void gi_marshalling_tests_gbytes_none_in (GBytes* v); + /* GStrv */ GStrv gi_marshalling_tests_gstrv_return (void); -- cgit v1.2.1 From dad7875eaa83957affa5abe3db5ad2fbdb1a4d72 Mon Sep 17 00:00:00 2001 From: Martin Pitt Date: Fri, 9 Nov 2012 08:03:21 +0100 Subject: gimarshallingtests: Fix return data type gi_marshalling_tests_genum_returnv() should (and does) return a GIMarshallingTestsGEnum, not a GIMarshallingTestsEnum. The latter is already covered by gi_marshalling_tests_enum_returnv(). --- tests/gimarshallingtests.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'tests/gimarshallingtests.h') diff --git a/tests/gimarshallingtests.h b/tests/gimarshallingtests.h index 1b5d7ce2..6cbefb08 100644 --- a/tests/gimarshallingtests.h +++ b/tests/gimarshallingtests.h @@ -303,7 +303,7 @@ typedef enum GType gi_marshalling_tests_genum_get_type (void) G_GNUC_CONST; #define GI_MARSHALLING_TESTS_TYPE_GENUM (gi_marshalling_tests_genum_get_type ()) -GIMarshallingTestsEnum gi_marshalling_tests_genum_returnv (void); +GIMarshallingTestsGEnum gi_marshalling_tests_genum_returnv (void); void gi_marshalling_tests_genum_in (GIMarshallingTestsGEnum v); -- cgit v1.2.1 From 91d5c783c9bf73e94c1ad050bd8ef1e260d2291c Mon Sep 17 00:00:00 2001 From: Martin Pitt Date: Wed, 14 Nov 2012 07:27:50 +0100 Subject: GIMarshallingTests: Add GVariant property --- tests/gimarshallingtests.h | 1 + 1 file changed, 1 insertion(+) (limited to 'tests/gimarshallingtests.h') diff --git a/tests/gimarshallingtests.h b/tests/gimarshallingtests.h index 6cbefb08..0e240773 100644 --- a/tests/gimarshallingtests.h +++ b/tests/gimarshallingtests.h @@ -1045,6 +1045,7 @@ struct _GIMarshallingTestsPropertiesObject { gdouble some_double; gchar **some_strv; GIMarshallingTestsBoxedStruct* some_boxed_struct; + GVariant *some_variant; }; struct _GIMarshallingTestsPropertiesObjectClass { -- cgit v1.2.1 From 17fc978c081195dad1f6a66d69cc6e18423e6db5 Mon Sep 17 00:00:00 2001 From: Martin Pitt Date: Wed, 21 Nov 2012 10:25:13 +0100 Subject: 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 --- tests/gimarshallingtests.h | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) (limited to 'tests/gimarshallingtests.h') diff --git a/tests/gimarshallingtests.h b/tests/gimarshallingtests.h index 0e240773..23af6a52 100644 --- a/tests/gimarshallingtests.h +++ b/tests/gimarshallingtests.h @@ -711,6 +711,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); -- cgit v1.2.1 From f4bb1c1b18085ddbd22596de7f72993a2fd76c2d Mon Sep 17 00:00:00 2001 From: Colin Walters Date: Thu, 29 Nov 2012 14:54:01 -0500 Subject: gimarshallingtests: Add a utf8-in-bytearray test Will be used by gjs --- tests/gimarshallingtests.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'tests/gimarshallingtests.h') diff --git a/tests/gimarshallingtests.h b/tests/gimarshallingtests.h index 23af6a52..840f763b 100644 --- a/tests/gimarshallingtests.h +++ b/tests/gimarshallingtests.h @@ -267,6 +267,10 @@ void gi_marshalling_tests_utf8_full_inout (gchar **utf8); GSList *gi_marshalling_tests_filename_list_return (void); +void gi_marshalling_tests_utf8_as_uint8array_in (const guint8 *array, + gsize len); + + /* Enum */ typedef enum -- cgit v1.2.1 From f885e3ecce5e4f1df19659b76a89598d5df4fab5 Mon Sep 17 00:00:00 2001 From: Gonzalo Odiard Date: Tue, 11 Dec 2012 10:54:00 -0300 Subject: gimarshallingtests:: Add test for returning a caller-allocated GArray https://bugzilla.gnome.org/show_bug.cgi?id=690041 --- tests/gimarshallingtests.h | 1 + 1 file changed, 1 insertion(+) (limited to 'tests/gimarshallingtests.h') diff --git a/tests/gimarshallingtests.h b/tests/gimarshallingtests.h index 840f763b..84366346 100644 --- a/tests/gimarshallingtests.h +++ b/tests/gimarshallingtests.h @@ -438,6 +438,7 @@ void gi_marshalling_tests_garray_utf8_none_in (GArray *array_); void gi_marshalling_tests_garray_utf8_none_out (GArray **array_); void gi_marshalling_tests_garray_utf8_container_out (GArray **array_); void gi_marshalling_tests_garray_utf8_full_out (GArray **array_); +void gi_marshalling_tests_garray_utf8_full_out_caller_allocated (GArray *array_); void gi_marshalling_tests_garray_utf8_none_inout (GArray **array_); void gi_marshalling_tests_garray_utf8_container_inout (GArray **array_); -- cgit v1.2.1 From 2611eb1a69bfe4a098c60ab8efda32ec443c250c Mon Sep 17 00:00:00 2001 From: Martin Pitt Date: Tue, 18 Dec 2012 22:43:25 +0100 Subject: gimarshallingtests: Add test for value array of boxed structs We already have tests for "array of simple structs" (gi_marshalling_tests_array_simple_struct_in) and "array of pointers to boxed structs" (gi_marshalling_tests_array_struct_in), but were missing "array of boxed structs", which reproduces https://bugzilla.gnome.org/show_bug.cgi?id=656312 --- tests/gimarshallingtests.h | 1 + 1 file changed, 1 insertion(+) (limited to 'tests/gimarshallingtests.h') diff --git a/tests/gimarshallingtests.h b/tests/gimarshallingtests.h index 84366346..e4875d6e 100644 --- a/tests/gimarshallingtests.h +++ b/tests/gimarshallingtests.h @@ -389,6 +389,7 @@ void gi_marshalling_tests_array_in_len_zero_terminated (const gint *ints, gint l void gi_marshalling_tests_array_string_in (const gchar **strings, gint length); void gi_marshalling_tests_array_uint8_in (const guint8 *chars, gint length); void gi_marshalling_tests_array_struct_in (GIMarshallingTestsBoxedStruct **structs, gint length); +void gi_marshalling_tests_array_struct_value_in (GIMarshallingTestsBoxedStruct *structs, gint length); void gi_marshalling_tests_array_struct_take_in (GIMarshallingTestsBoxedStruct **structs, gint length); void gi_marshalling_tests_array_simple_struct_in (GIMarshallingTestsSimpleStruct *structs, gint length); void gi_marshalling_tests_multi_array_key_value_in (gint length, const gchar **keys, const GValue *values); -- cgit v1.2.1 From 6ad132c69c74f46f54d770835ea45e8a58fbd612 Mon Sep 17 00:00:00 2001 From: Paolo Borelli Date: Thu, 10 Jan 2013 22:23:36 +0100 Subject: 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.h | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'tests/gimarshallingtests.h') diff --git a/tests/gimarshallingtests.h b/tests/gimarshallingtests.h index e4875d6e..03d165b9 100644 --- a/tests/gimarshallingtests.h +++ b/tests/gimarshallingtests.h @@ -777,6 +777,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); -- cgit v1.2.1 From 63c9759e17ef5ac71c50d5ac91289714db19b587 Mon Sep 17 00:00:00 2001 From: Vadim Rutkovsky Date: Fri, 11 Jan 2013 12:17:53 +0100 Subject: gimarshallingtests: Add string_ to boxed structure Co-Authored-By: Martin Pitt https://bugzilla.gnome.org/show_bug.cgi?id=678401 --- tests/gimarshallingtests.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'tests/gimarshallingtests.h') diff --git a/tests/gimarshallingtests.h b/tests/gimarshallingtests.h index 03d165b9..6ac212e7 100644 --- a/tests/gimarshallingtests.h +++ b/tests/gimarshallingtests.h @@ -656,6 +656,7 @@ void gi_marshalling_tests_pointer_struct_inv (GIMarshallingTestsPointerStruct *s struct _GIMarshallingTestsBoxedStruct { glong long_; + gchar *string_; GStrv g_strv; }; @@ -968,7 +969,7 @@ typedef struct _GIMarshallingTestsInterface3Iface GIMarshallingTestsInterface3If struct _GIMarshallingTestsInterface3Iface { GTypeInterface base_iface; - + /** * GIMarshallingTestsInterface3::test_variant_array_in: * @in: (in) (array length=n_in): @@ -1080,7 +1081,7 @@ struct _GIMarshallingTestsPropertiesObject { gfloat some_float; gdouble some_double; gchar **some_strv; - GIMarshallingTestsBoxedStruct* some_boxed_struct; + GIMarshallingTestsBoxedStruct* some_boxed_struct; GVariant *some_variant; }; -- cgit v1.2.1 From d94aa67674261cf921f5a29565c21ebe1ad42a31 Mon Sep 17 00:00:00 2001 From: Martin Pitt Date: Mon, 14 Jan 2013 08:48:03 +0100 Subject: gimarshallingtests: Add boxed GList property https://bugzilla.gnome.org/show_bug.cgi?id=684059 --- tests/gimarshallingtests.h | 1 + 1 file changed, 1 insertion(+) (limited to 'tests/gimarshallingtests.h') diff --git a/tests/gimarshallingtests.h b/tests/gimarshallingtests.h index 6ac212e7..74090f05 100644 --- a/tests/gimarshallingtests.h +++ b/tests/gimarshallingtests.h @@ -1082,6 +1082,7 @@ struct _GIMarshallingTestsPropertiesObject { gdouble some_double; gchar **some_strv; GIMarshallingTestsBoxedStruct* some_boxed_struct; + GList* some_boxed_glist; GVariant *some_variant; }; -- cgit v1.2.1 From 5e4ddbcb8eacede04d5ade9e630d2efe29c022a0 Mon Sep 17 00:00:00 2001 From: Martin Pitt Date: Mon, 14 Jan 2013 12:34:06 +0100 Subject: gimarshallingtests: Add method taking a GParamSpec argument Add gi_marshalling_tests_param_spec_in_bool(), supplementing the already existing tests for a GParamSpec out argument and return value. https://bugzilla.gnome.org/show_bug.cgi?id=682355 --- tests/gimarshallingtests.h | 1 + 1 file changed, 1 insertion(+) (limited to 'tests/gimarshallingtests.h') diff --git a/tests/gimarshallingtests.h b/tests/gimarshallingtests.h index 74090f05..10179c68 100644 --- a/tests/gimarshallingtests.h +++ b/tests/gimarshallingtests.h @@ -1003,6 +1003,7 @@ void gi_marshalling_tests_gerror_out_transfer_none(GError **err, const gchar **d GError *gi_marshalling_tests_gerror_return(void); /* GParamSpec */ +void gi_marshalling_tests_param_spec_in_bool(const GParamSpec *param); GParamSpec *gi_marshalling_tests_param_spec_return (void); void gi_marshalling_tests_param_spec_out(GParamSpec **param); -- cgit v1.2.1 From f65395f5f9f1ef980315ae11c454c324bb61e24d Mon Sep 17 00:00:00 2001 From: Martin Pitt Date: Tue, 15 Jan 2013 10:05:20 +0100 Subject: tests: Fix compiler warnings Fix (void) function declarations that occur with -Wstrict-prototypes, and the g_param_spec_get_name() which drops the const from its argument. --- tests/gimarshallingtests.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'tests/gimarshallingtests.h') diff --git a/tests/gimarshallingtests.h b/tests/gimarshallingtests.h index 10179c68..803b02c7 100644 --- a/tests/gimarshallingtests.h +++ b/tests/gimarshallingtests.h @@ -573,7 +573,7 @@ GClosure *gi_marshalling_tests_gclosure_return (void); /** * GIMarshallingTestsCallbackReturnValueOnly: */ -typedef glong (* GIMarshallingTestsCallbackReturnValueOnly) (); +typedef glong (* GIMarshallingTestsCallbackReturnValueOnly) (void); glong gi_marshalling_tests_callback_return_value_only (GIMarshallingTestsCallbackReturnValueOnly callback); -- cgit v1.2.1 From 1fb2d14693fc7ecf74322c7f9ca7ca40907e7649 Mon Sep 17 00:00:00 2001 From: Simon Feltman Date: Wed, 2 Jan 2013 02:14:08 -0800 Subject: gimarshallingtests: Add test helpers for marshaling of object arguments Add a number of vfuncs and methods which can be used for testing marshaling of objects with different combinations of ownership transference. An important part of these test vfuncs and methods is they do not pass object returns and arguments through them. Instead the methods return reference counts and floating attributes. This allows isolation and ensures any problem with round trip object marshaling does not obscure what should be tested from the perspective of C as the caller of a vfunc. Tests and vfuncs can then be written in any language with gi bindings. https://bugzilla.gnome.org/show_bug.cgi?id=687522 --- tests/gimarshallingtests.h | 49 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) (limited to 'tests/gimarshallingtests.h') diff --git a/tests/gimarshallingtests.h b/tests/gimarshallingtests.h index 803b02c7..82137a75 100644 --- a/tests/gimarshallingtests.h +++ b/tests/gimarshallingtests.h @@ -803,6 +803,47 @@ struct _GIMarshallingTestsObjectClass * @error: A #GError */ gboolean (*vfunc_meth_with_err) (GIMarshallingTestsObject *object, gint x, GError **error); + + + /** + * GIMarshallingTestsObjectClass::vfunc_return_object_transfer_none: + * + * Returns: (transfer none) + */ + GObject* (* vfunc_return_object_transfer_none) (GIMarshallingTestsObject *self); + + /** + * GIMarshallingTestsObjectClass::vfunc_return_object_tansfer_full: + * + * Returns: (transfer full) + */ + GObject* (* vfunc_return_object_tansfer_full) (GIMarshallingTestsObject *self); + + /** + * GIMarshallingTestsObjectClass::vfunc_out_object_transfer_none: + * @object: (out) (transfer none): + */ + void (* vfunc_out_object_transfer_none) (GIMarshallingTestsObject *self, GObject **object); + + /** + * GIMarshallingTestsObjectClass::vfunc_out_object_tansfer_full: + * @object: (out) (transfer full): + */ + void (* vfunc_out_object_tansfer_full) (GIMarshallingTestsObject *self, GObject **object); + + /** + * GIMarshallingTestsObjectClass::vfunc_in_object_tansfer_none: + * @object: (in) (transfer none): + */ + void (* vfunc_in_object_tansfer_none) (GIMarshallingTestsObject *self, GObject *object); + + /** + * GIMarshallingTestsObjectClass::vfunc_in_object_tansfer_full: + * @object: (in) (transfer full): + */ + void (* vfunc_in_object_tansfer_full) (GIMarshallingTestsObject *self, GObject *object); + + }; struct _GIMarshallingTestsObject @@ -840,6 +881,13 @@ glong gi_marshalling_tests_object_vfunc_return_value_and_one_out_parameter (GIMa 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); +void gi_marshalling_tests_object_get_ref_info_for_vfunc_return_object_transfer_none (GIMarshallingTestsObject *self, guint *ref_count, gboolean *is_floating); +void gi_marshalling_tests_object_get_ref_info_for_vfunc_return_object_transfer_full (GIMarshallingTestsObject *self, guint *ref_count, gboolean *is_floating); +void gi_marshalling_tests_object_get_ref_info_for_vfunc_out_object_transfer_none (GIMarshallingTestsObject *self, guint *ref_count, gboolean *is_floating); +void gi_marshalling_tests_object_get_ref_info_for_vfunc_out_object_transfer_full (GIMarshallingTestsObject *self, guint *ref_count, gboolean *is_floating); +void gi_marshalling_tests_object_get_ref_info_for_vfunc_in_object_transfer_none (GIMarshallingTestsObject *self, GType type, guint *ref_count, gboolean *is_floating); +void gi_marshalling_tests_object_get_ref_info_for_vfunc_in_object_transfer_full (GIMarshallingTestsObject *self, GType type, guint *ref_count, gboolean *is_floating); + GIMarshallingTestsObject *gi_marshalling_tests_object_none_return (void); GIMarshallingTestsObject *gi_marshalling_tests_object_full_return (void); @@ -1085,6 +1133,7 @@ struct _GIMarshallingTestsPropertiesObject { GIMarshallingTestsBoxedStruct* some_boxed_struct; GList* some_boxed_glist; GVariant *some_variant; + GObject *some_object; }; struct _GIMarshallingTestsPropertiesObjectClass { -- cgit v1.2.1 From 7f144d32095a0901e4bbe3a22b22487887cd53eb Mon Sep 17 00:00:00 2001 From: Simon Feltman Date: Wed, 6 Feb 2013 12:54:14 -0800 Subject: gimarshalingtests: fix spelling mistake in new vfunc object helpers --- tests/gimarshallingtests.h | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'tests/gimarshallingtests.h') diff --git a/tests/gimarshallingtests.h b/tests/gimarshallingtests.h index 82137a75..a361de02 100644 --- a/tests/gimarshallingtests.h +++ b/tests/gimarshallingtests.h @@ -813,11 +813,11 @@ struct _GIMarshallingTestsObjectClass GObject* (* vfunc_return_object_transfer_none) (GIMarshallingTestsObject *self); /** - * GIMarshallingTestsObjectClass::vfunc_return_object_tansfer_full: + * GIMarshallingTestsObjectClass::vfunc_return_object_transfer_full: * * Returns: (transfer full) */ - GObject* (* vfunc_return_object_tansfer_full) (GIMarshallingTestsObject *self); + GObject* (* vfunc_return_object_transfer_full) (GIMarshallingTestsObject *self); /** * GIMarshallingTestsObjectClass::vfunc_out_object_transfer_none: @@ -826,22 +826,22 @@ struct _GIMarshallingTestsObjectClass void (* vfunc_out_object_transfer_none) (GIMarshallingTestsObject *self, GObject **object); /** - * GIMarshallingTestsObjectClass::vfunc_out_object_tansfer_full: + * GIMarshallingTestsObjectClass::vfunc_out_object_transfer_full: * @object: (out) (transfer full): */ - void (* vfunc_out_object_tansfer_full) (GIMarshallingTestsObject *self, GObject **object); + void (* vfunc_out_object_transfer_full) (GIMarshallingTestsObject *self, GObject **object); /** - * GIMarshallingTestsObjectClass::vfunc_in_object_tansfer_none: + * GIMarshallingTestsObjectClass::vfunc_in_object_transfer_none: * @object: (in) (transfer none): */ - void (* vfunc_in_object_tansfer_none) (GIMarshallingTestsObject *self, GObject *object); + void (* vfunc_in_object_transfer_none) (GIMarshallingTestsObject *self, GObject *object); /** - * GIMarshallingTestsObjectClass::vfunc_in_object_tansfer_full: + * GIMarshallingTestsObjectClass::vfunc_in_object_transfer_full: * @object: (in) (transfer full): */ - void (* vfunc_in_object_tansfer_full) (GIMarshallingTestsObject *self, GObject *object); + void (* vfunc_in_object_transfer_full) (GIMarshallingTestsObject *self, GObject *object); }; -- cgit v1.2.1 From b5cd5c07a1b059d3d90d86d04426d72eedcfaa39 Mon Sep 17 00:00:00 2001 From: Simon Feltman Date: Sun, 17 Mar 2013 23:03:46 -0700 Subject: gimarshallingtests: Add tests for enum returned from vfunc Add vfuncs and methods for an object returning an enum or using one as an output argument. https://bugzilla.gnome.org/show_bug.cgi?id=637832 --- tests/gimarshallingtests.h | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) (limited to 'tests/gimarshallingtests.h') diff --git a/tests/gimarshallingtests.h b/tests/gimarshallingtests.h index a361de02..67c2f70e 100644 --- a/tests/gimarshallingtests.h +++ b/tests/gimarshallingtests.h @@ -804,6 +804,16 @@ struct _GIMarshallingTestsObjectClass */ gboolean (*vfunc_meth_with_err) (GIMarshallingTestsObject *object, gint x, GError **error); + /** + * GIMarshallingTestsObjectClass::vfunc_return_enum: + */ + GIMarshallingTestsFlags (* vfunc_return_enum) (GIMarshallingTestsObject *self); + + /** + * GIMarshallingTestsObjectClass::vfunc_out_enum: + * @_enum: (out): + */ + void (* vfunc_out_enum) (GIMarshallingTestsObject *self, GIMarshallingTestsEnum *_enum); /** * GIMarshallingTestsObjectClass::vfunc_return_object_transfer_none: @@ -842,8 +852,6 @@ struct _GIMarshallingTestsObjectClass * @object: (in) (transfer full): */ void (* vfunc_in_object_transfer_full) (GIMarshallingTestsObject *self, GObject *object); - - }; struct _GIMarshallingTestsObject @@ -881,6 +889,9 @@ glong gi_marshalling_tests_object_vfunc_return_value_and_one_out_parameter (GIMa 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); +GIMarshallingTestsEnum gi_marshalling_tests_object_vfunc_return_enum (GIMarshallingTestsObject *self); +void gi_marshalling_tests_object_vfunc_out_enum (GIMarshallingTestsObject *self, GIMarshallingTestsEnum *_enum); + void gi_marshalling_tests_object_get_ref_info_for_vfunc_return_object_transfer_none (GIMarshallingTestsObject *self, guint *ref_count, gboolean *is_floating); void gi_marshalling_tests_object_get_ref_info_for_vfunc_return_object_transfer_full (GIMarshallingTestsObject *self, guint *ref_count, gboolean *is_floating); void gi_marshalling_tests_object_get_ref_info_for_vfunc_out_object_transfer_none (GIMarshallingTestsObject *self, guint *ref_count, gboolean *is_floating); -- cgit v1.2.1 From dbb622812b29e5e67da8841409489d1d242a12b6 Mon Sep 17 00:00:00 2001 From: Simon Feltman Date: Thu, 4 Apr 2013 20:47:18 -0700 Subject: gimarshallingtests: Fix vfunc_return_enum type Change mistaken return type of GIMarshallingTestsFlags to GIMarshallingTestsEnum in vfunc_return_enum. https://bugzilla.gnome.org/show_bug.cgi?id=637832 --- tests/gimarshallingtests.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'tests/gimarshallingtests.h') diff --git a/tests/gimarshallingtests.h b/tests/gimarshallingtests.h index 67c2f70e..56c6a0f2 100644 --- a/tests/gimarshallingtests.h +++ b/tests/gimarshallingtests.h @@ -807,7 +807,7 @@ struct _GIMarshallingTestsObjectClass /** * GIMarshallingTestsObjectClass::vfunc_return_enum: */ - GIMarshallingTestsFlags (* vfunc_return_enum) (GIMarshallingTestsObject *self); + GIMarshallingTestsEnum (* vfunc_return_enum) (GIMarshallingTestsObject *self); /** * GIMarshallingTestsObjectClass::vfunc_out_enum: -- cgit v1.2.1 From 35bfc13736904e6f8f9f2c8ff49fb1c9518e874a Mon Sep 17 00:00:00 2001 From: Giovanni Campagna Date: Tue, 23 Apr 2013 22:27:27 +0200 Subject: GIMarshallingTests: remove a function that does not exists It's breaking the gjs test suite https://bugzilla.gnome.org/show_bug.cgi?id=698698 --- tests/gimarshallingtests.h | 1 - 1 file changed, 1 deletion(-) (limited to 'tests/gimarshallingtests.h') diff --git a/tests/gimarshallingtests.h b/tests/gimarshallingtests.h index 56c6a0f2..33f3b3e9 100644 --- a/tests/gimarshallingtests.h +++ b/tests/gimarshallingtests.h @@ -910,7 +910,6 @@ void gi_marshalling_tests_object_full_out (GIMarshallingTestsObject **object); void gi_marshalling_tests_object_none_inout (GIMarshallingTestsObject **object); void gi_marshalling_tests_object_full_inout (GIMarshallingTestsObject **object); -void gi_marshalling_tests_object_inout_same (GIMarshallingTestsObject **object); void gi_marshalling_tests_object_int8_in (GIMarshallingTestsObject *object, gint8 in); void gi_marshalling_tests_object_int8_out (GIMarshallingTestsObject *object, gint8 *out); -- cgit v1.2.1 From 049c7fd7cf1faaf1ddcd6ed5445dfaceefe70295 Mon Sep 17 00:00:00 2001 From: Simon Feltman Date: Tue, 2 Jul 2013 19:13:53 -0700 Subject: gimarshallingtests: Add test for GValue pass-by-reference https://bugzilla.gnome.org/show_bug.cgi?id=701058 --- tests/gimarshallingtests.h | 1 + 1 file changed, 1 insertion(+) (limited to 'tests/gimarshallingtests.h') diff --git a/tests/gimarshallingtests.h b/tests/gimarshallingtests.h index 33f3b3e9..3b436f0c 100644 --- a/tests/gimarshallingtests.h +++ b/tests/gimarshallingtests.h @@ -545,6 +545,7 @@ GValue *gi_marshalling_tests_gvalue_return (void); void gi_marshalling_tests_gvalue_in (GValue *value); void gi_marshalling_tests_gvalue_int64_in (GValue *value); void gi_marshalling_tests_gvalue_in_with_type (GValue *value, GType type); +void gi_marshalling_tests_gvalue_in_with_modification (GValue *value); void gi_marshalling_tests_gvalue_in_enum (GValue *value); -- cgit v1.2.1 From a19bfeb4da53825ad960c9e33306b9437a22c4f6 Mon Sep 17 00:00:00 2001 From: Simon Feltman Date: Sat, 27 Jul 2013 17:54:59 -0700 Subject: gimarshalingtests: Add tests for multiple utf8 args with allow-none Add test function which accepts multiple allow-none utf8 arguments. This can be used for testing a default of NULL for unsupplied arguments annotated with allow-none. https://bugzilla.gnome.org/show_bug.cgi?id=640812 --- tests/gimarshallingtests.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'tests/gimarshallingtests.h') diff --git a/tests/gimarshallingtests.h b/tests/gimarshallingtests.h index 3b436f0c..e308db64 100644 --- a/tests/gimarshallingtests.h +++ b/tests/gimarshallingtests.h @@ -1047,6 +1047,8 @@ void gi_marshalling_tests_int_three_in_three_out(gint a, gint b, gint c, gint *out0, gint *out1, gint *out2); gint gi_marshalling_tests_int_return_out (gint *int_); +/* Default arguments */ +void gi_marshalling_tests_int_two_in_utf8_two_in_with_allow_none (gint a, gint b, const gchar *c, const gchar *d); /* GError */ -- cgit v1.2.1 From 6c9e4d5d648b5bf7ebff042f70c57e6a3d86fc88 Mon Sep 17 00:00:00 2001 From: Simon Feltman Date: Tue, 6 Aug 2013 01:22:52 -0700 Subject: gimarshalingtests: Add tests for mixed allow-none and implicit args Add test method with an allow-none in the middle of non allow-none arguments. Add test method with an array and its length argument interleaved with allow-none arguments. https://bugzilla.gnome.org/show_bug.cgi?id=640812 --- tests/gimarshallingtests.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'tests/gimarshallingtests.h') diff --git a/tests/gimarshallingtests.h b/tests/gimarshallingtests.h index e308db64..e57f92ed 100644 --- a/tests/gimarshallingtests.h +++ b/tests/gimarshallingtests.h @@ -1049,6 +1049,9 @@ gint gi_marshalling_tests_int_return_out (gint *int_); /* Default arguments */ void gi_marshalling_tests_int_two_in_utf8_two_in_with_allow_none (gint a, gint b, const gchar *c, const gchar *d); +void gi_marshalling_tests_int_one_in_utf8_two_in_one_allows_none (gint a, const gchar *b, const gchar *c); +void gi_marshalling_tests_array_in_utf8_two_in (const gint *ints, gint length, const gchar *a, const gchar *b); +void gi_marshalling_tests_array_in_utf8_two_in_out_of_order (gint length, const gchar *a, const gint *ints, const gchar *b); /* GError */ -- cgit v1.2.1 From 38e4e0d4f3fd8a9aa8f024f6d6283e619df74fe9 Mon Sep 17 00:00:00 2001 From: Mike Gorse Date: Fri, 24 Jan 2014 05:14:48 -0600 Subject: Add test passing an owned boxed structure to a callback https://bugzilla.gnome.org/show_bug.cgi?id=722899 --- tests/gimarshallingtests.h | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'tests/gimarshallingtests.h') diff --git a/tests/gimarshallingtests.h b/tests/gimarshallingtests.h index e57f92ed..5568a6f9 100644 --- a/tests/gimarshallingtests.h +++ b/tests/gimarshallingtests.h @@ -618,6 +618,16 @@ glong gi_marshalling_tests_callback_return_value_and_multiple_out_parameters (GI glong *a, glong *b); +/** + * GIMarshallingTestsCallbackOwnedBoxed +* @box: (transfer none): the boxed structure. + */ +typedef void (* GIMarshallingTestsCallbackOwnedBoxed) (GIMarshallingTestsBoxedStruct *box, + void *user_data); + +glong gi_marshalling_tests_callback_owned_boxed (GIMarshallingTestsCallbackOwnedBoxed callback, + void *callback_data); + /* Pointer */ gpointer gi_marshalling_tests_pointer_in_return (gpointer pointer); -- cgit v1.2.1