From 9a472fb76c8d603b439562accf0593bb63d86215 Mon Sep 17 00:00:00 2001 From: Martin Pitt Date: Mon, 10 Sep 2012 16:19:41 +0200 Subject: gimarshallingtests: Add in/out int64 GValue method arguments See https://bugzilla.gnome.org/show_bug.cgi?id=683596 --- tests/gimarshallingtests.c | 28 ++++++++++++++++++++++++++++ tests/gimarshallingtests.h | 2 ++ 2 files changed, 30 insertions(+) diff --git a/tests/gimarshallingtests.c b/tests/gimarshallingtests.c index dec04387..3eb6e075 100644 --- a/tests/gimarshallingtests.c +++ b/tests/gimarshallingtests.c @@ -2944,6 +2944,16 @@ gi_marshalling_tests_gvalue_in (GValue *value) g_assert_cmpint(g_value_get_int(value), ==, 42); } +/** + * gi_marshalling_tests_gvalue_int64_in: + * @value: (transfer none): + */ +void +gi_marshalling_tests_gvalue_int64_in (GValue *value) +{ + g_assert_cmpint(g_value_get_int64(value), ==, G_MAXINT64); +} + /** * gi_marshalling_tests_gvalue_in_with_type: * @value: (transfer none): @@ -2983,6 +2993,24 @@ gi_marshalling_tests_gvalue_out (GValue **value) *value = new_value; } +/** + * gi_marshalling_tests_gvalue_int64_out: + * @value: (out) (transfer none): + */ +void +gi_marshalling_tests_gvalue_int64_out (GValue **value) +{ + static GValue *new_value = NULL; + + if (new_value == NULL) { + new_value = g_new0(GValue, 1); + g_value_init(new_value, G_TYPE_INT64); + g_value_set_int64(new_value, G_MAXINT64); + } + + *value = new_value; +} + /** * gi_marshalling_tests_gvalue_out_caller_allocates: * @value: (out) (transfer none): diff --git a/tests/gimarshallingtests.h b/tests/gimarshallingtests.h index 9b88223a..cdcb08e6 100644 --- a/tests/gimarshallingtests.h +++ b/tests/gimarshallingtests.h @@ -528,11 +528,13 @@ void gi_marshalling_tests_ghashtable_utf8_full_inout (GHashTable **hash_table); 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_enum (GValue *value); void gi_marshalling_tests_gvalue_out (GValue **value); +void gi_marshalling_tests_gvalue_int64_out (GValue **value); void gi_marshalling_tests_gvalue_out_caller_allocates (GValue *value); void gi_marshalling_tests_gvalue_inout (GValue **value); -- cgit v1.2.1