[gobject-introspection] gimarshallingtests: Add in/out int64 GValue method arguments



commit 9a472fb76c8d603b439562accf0593bb63d86215
Author: Martin Pitt <martinpitt gnome org>
Date:   Mon Sep 10 16:19:41 2012 +0200

    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(+), 0 deletions(-)
---
diff --git a/tests/gimarshallingtests.c b/tests/gimarshallingtests.c
index dec0438..3eb6e07 100644
--- a/tests/gimarshallingtests.c
+++ b/tests/gimarshallingtests.c
@@ -2945,6 +2945,16 @@ gi_marshalling_tests_gvalue_in (GValue *value)
 }
 
 /**
+ * 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):
  * @type:
@@ -2984,6 +2994,24 @@ gi_marshalling_tests_gvalue_out (GValue **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 9b88223..cdcb08e 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);



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