[gobject-introspection] gimarshallingtests: Add a test function that looks like gtk_init()
- From: Colin Walters <walters src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gobject-introspection] gimarshallingtests: Add a test function that looks like gtk_init()
- Date: Thu, 16 Jun 2011 23:49:14 +0000 (UTC)
commit bdde93522b64bc5b43ce5260ad634f55cb8b4c44
Author: Colin Walters <walters verbum org>
Date: Thu Jun 16 18:03:29 2011 -0400
gimarshallingtests: Add a test function that looks like gtk_init()
tests/gimarshallingtests.c | 21 +++++++++++++++++++++
tests/gimarshallingtests.h | 2 ++
2 files changed, 23 insertions(+), 0 deletions(-)
---
diff --git a/tests/gimarshallingtests.c b/tests/gimarshallingtests.c
index 5284223..b2ff715 100644
--- a/tests/gimarshallingtests.c
+++ b/tests/gimarshallingtests.c
@@ -1100,6 +1100,27 @@ gi_marshalling_tests_utf8_full_inout (gchar **utf8)
/**
+ * gi_marshalling_tests_init_function:
+ * @n_args: (inout) (allow-none): number of args
+ * @argv: (inout) (array length=n_args) (allow-none): args
+ *
+ * This is like gtk_init().
+ */
+gboolean
+gi_marshalling_tests_init_function (gint *n_args, char ***argv)
+{
+ if (n_args == NULL)
+ return TRUE;
+
+ if (*n_args == 0)
+ return TRUE;
+ (*n_args)--;
+ g_assert (argv != NULL);
+ *argv[*n_args] = NULL;
+ return TRUE;
+}
+
+/**
* gi_marshalling_tests_array_fixed_int_return:
* Returns: (array fixed-size=4):
*/
diff --git a/tests/gimarshallingtests.h b/tests/gimarshallingtests.h
index c97f63e..ae5d47c 100644
--- a/tests/gimarshallingtests.h
+++ b/tests/gimarshallingtests.h
@@ -353,6 +353,8 @@ void gi_marshalling_tests_no_type_flags_inout (GIMarshallingTestsNoTypeFlags *fl
/* Arrays */
+gboolean gi_marshalling_tests_init_function (gint *n_args, char ***argv);
+
/* Fixed-size */
const gint *gi_marshalling_tests_array_fixed_int_return (void);
const gshort *gi_marshalling_tests_array_fixed_short_return (void);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]