diff options
author | Colin Walters <walters@verbum.org> | 2011-06-16 18:03:29 -0400 |
---|---|---|
committer | Colin Walters <walters@verbum.org> | 2011-06-16 18:03:29 -0400 |
commit | bdde93522b64bc5b43ce5260ad634f55cb8b4c44 (patch) | |
tree | c77813ecd3dda6f9a9b804ade9a323bf80d9a493 /tests | |
parent | 9e59567494689533bc1553ad0a02d9a37d8f1585 (diff) | |
download | gobject-introspection-bdde93522b64bc5b43ce5260ad634f55cb8b4c44.tar.gz |
gimarshallingtests: Add a test function that looks like gtk_init()
Diffstat (limited to 'tests')
-rw-r--r-- | tests/gimarshallingtests.c | 21 | ||||
-rw-r--r-- | tests/gimarshallingtests.h | 2 |
2 files changed, 23 insertions, 0 deletions
diff --git a/tests/gimarshallingtests.c b/tests/gimarshallingtests.c index 52842231..b2ff7155 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 c97f63eb..ae5d47cb 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); |