diff options
author | Tomeu Vizoso <tomeu@sugarlabs.org> | 2010-05-03 19:17:00 +0200 |
---|---|---|
committer | Tomeu Vizoso <tomeu@sugarlabs.org> | 2010-05-03 19:17:00 +0200 |
commit | 39f2997b9f32598fa2288cdac36f513fcab590b5 (patch) | |
tree | 90e1e308a99d30edf42480e84d6f0a4fbfe6ceb7 /gir | |
parent | ffc28a47400e06b39e05be4f7e4c8dccef4bd8ea (diff) | |
download | gobject-introspection-39f2997b9f32598fa2288cdac36f513fcab590b5.tar.gz |
Revert "Add support for GArrays: add g_type_info_get_array_type() and properly scan GArray args"
This reverts commit 87291e08b0fd34b62e1ad9811c174108b38311a9.
Diffstat (limited to 'gir')
-rw-r--r-- | gir/gimarshallingtests.c | 263 | ||||
-rw-r--r-- | gir/gimarshallingtests.h | 20 |
2 files changed, 0 insertions, 283 deletions
diff --git a/gir/gimarshallingtests.c b/gir/gimarshallingtests.c index 0a8b7946..c48a430a 100644 --- a/gir/gimarshallingtests.c +++ b/gir/gimarshallingtests.c @@ -1318,269 +1318,6 @@ g_i_marshalling_tests_array_zero_terminated_inout (gchar ***utf8s) /** - * g_i_marshalling_tests_garray_int_none_return: - * Returns: (element-type gint) (transfer none): - */ -GArray * -g_i_marshalling_tests_garray_int_none_return (void) -{ - static GArray *array = NULL; - gint i; - - if (array == NULL) { - array = g_array_new (TRUE, TRUE, sizeof (gint)); - for (i = -1; i < 3; i++) - g_array_append_val (array, i); - } - - return array; -} - -/** - * g_i_marshalling_tests_garray_utf8_none_return: - * Returns: (element-type utf8) (transfer none): - */ -GArray * -g_i_marshalling_tests_garray_utf8_none_return (void) -{ - static GArray *array = NULL; - static gchar *values[] = {"0", "1", "2", NULL}; - gint i; - - if (array == NULL) { - array = g_array_new (TRUE, TRUE, sizeof (gint)); - for (i = 0; values[i]; i++) - g_array_append_val (array, values[i]); - } - - return array; -} - -/** - * g_i_marshalling_tests_garray_utf8_container_return: - * Returns: (element-type utf8) (transfer container): - */ -GArray * -g_i_marshalling_tests_garray_utf8_container_return (void) -{ - GArray *array = NULL; - static gchar *values[] = {"0", "1", "2", NULL}; - gint i; - - array = g_array_new (TRUE, TRUE, sizeof (gint)); - for (i = 0; values[i]; i++) - g_array_append_val (array, values[i]); - - return array; -} - -/** - * g_i_marshalling_tests_garray_utf8_full_return: - * Returns: (element-type utf8) (transfer full): - */ -GArray * -g_i_marshalling_tests_garray_utf8_full_return (void) -{ - GArray *array = NULL; - static gchar *values[] = {"0", "1", "2", NULL}; - gint i; - - array = g_array_new (TRUE, TRUE, sizeof (gint)); - for (i = 0; values[i]; i++) { - gchar *str = g_strdup (values[i]); - g_array_append_val (array, str); - } - - return array; -} - -/** - * g_i_marshalling_tests_garray_int_none_in: - * @array_: (element-type gint) (transfer none): - */ -void -g_i_marshalling_tests_garray_int_none_in (GArray *array_) -{ - g_assert (array_->len == 4); - g_assert (g_array_index (array_, gint, 0) == -1); - g_assert (g_array_index (array_, gint, 1) == 0); - g_assert (g_array_index (array_, gint, 2) == 1); - g_assert (g_array_index (array_, gint, 3) == 2); -} - -/** - * g_i_marshalling_tests_garray_utf8_none_in: - * @array_: (element-type utf8) (transfer none): - */ -void -g_i_marshalling_tests_garray_utf8_none_in (GArray *array_) -{ - g_assert (array_->len == 3); - g_assert (strcmp (g_array_index (array_, gchar*, 0), "0") == 0); - g_assert (strcmp (g_array_index (array_, gchar*, 1), "1") == 0); - g_assert (strcmp (g_array_index (array_, gchar*, 2), "2") == 0); -} - -/** - * g_i_marshalling_tests_garray_utf8_container_in: - * @array_: (element-type utf8) (transfer container): - */ -void -g_i_marshalling_tests_garray_utf8_container_in (GArray *array_) -{ - g_assert (array_->len == 3); - g_assert (strcmp (g_array_index (array_, gchar*, 0), "0") == 0); - g_assert (strcmp (g_array_index (array_, gchar*, 1), "1") == 0); - g_assert (strcmp (g_array_index (array_, gchar*, 2), "2") == 0); - g_array_free (array_, TRUE); -} - -/** - * g_i_marshalling_tests_garray_utf8_full_in: - * @array_: (element-type utf8) (transfer full): - */ -void -g_i_marshalling_tests_garray_utf8_full_in (GArray *array_) -{ - g_assert (array_->len == 3); - g_assert (strcmp (g_array_index (array_, gchar*, 0), "0") == 0); - g_assert (strcmp (g_array_index (array_, gchar*, 1), "1") == 0); - g_assert (strcmp (g_array_index (array_, gchar*, 2), "2") == 0); - g_free (g_array_index (array_, gchar*, 0)); - g_free (g_array_index (array_, gchar*, 1)); - g_free (g_array_index (array_, gchar*, 2)); - g_array_free (array_, TRUE); -} - -/** - * g_i_marshalling_tests_garray_utf8_none_out: - * @array_: (out) (element-type utf8) (transfer none): - */ -void -g_i_marshalling_tests_garray_utf8_none_out (GArray **array_) -{ - static GArray *internal = NULL; - static gchar *values[] = {"0", "1", "2", NULL}; - gint i; - - if (internal == NULL) { - internal = g_array_new (TRUE, TRUE, sizeof (gint)); - for (i = 0; values[i]; i++) - g_array_append_val (internal, values[i]); - } - - *array_ = internal; -} - -/** - * g_i_marshalling_tests_garray_utf8_container_out: - * @array_: (out) (element-type utf8) (transfer container): - */ -void -g_i_marshalling_tests_garray_utf8_container_out (GArray **array_) -{ - static gchar *values[] = {"0", "1", "2", NULL}; - gint i; - - *array_ = NULL; - - *array_ = g_array_new (TRUE, TRUE, sizeof (gint)); - for (i = 0; values[i]; i++) - g_array_append_val (*array_, values[i]); -} - -/** - * g_i_marshalling_tests_garray_utf8_full_out: - * @array_: (out) (element-type utf8) (transfer full): - */ -void -g_i_marshalling_tests_garray_utf8_full_out (GArray **array_) -{ - static gchar *values[] = {"0", "1", "2", NULL}; - gint i; - - *array_ = NULL; - - *array_ = g_array_new (TRUE, TRUE, sizeof (gint)); - for (i = 0; values[i]; i++) { - gchar *str = g_strdup (values[i]); - g_array_append_val (*array_, str); - } -} - -/** - * g_i_marshalling_tests_garray_utf8_none_inout: - * @array_: (inout) (element-type utf8) (transfer none): - */ -void -g_i_marshalling_tests_garray_utf8_none_inout (GArray **array_) -{ - static GArray *internal = NULL; - static gchar *values[] = {"-2", "-1", "0", "1", NULL}; - gint i; - - g_assert ((*array_)->len == 3); - g_assert (strcmp (g_array_index (*array_, gchar*, 0), "0") == 0); - g_assert (strcmp (g_array_index (*array_, gchar*, 1), "1") == 0); - g_assert (strcmp (g_array_index (*array_, gchar*, 2), "2") == 0); - - if (internal == NULL) { - internal = g_array_new (TRUE, TRUE, sizeof (gint)); - for (i = 0; values[i]; i++) - g_array_append_val (internal, values[i]); - } - - *array_ = internal; -} - -/** - * g_i_marshalling_tests_garray_utf8_container_inout: - * @array_: (inout) (element-type utf8) (transfer container): - */ -void -g_i_marshalling_tests_garray_utf8_container_inout (GArray **array_) -{ - static gchar *val1 = "-1"; - static gchar *val2 = "-2"; - - g_assert ((*array_)->len == 3); - g_assert (strcmp (g_array_index (*array_, gchar*, 0), "0") == 0); - g_assert (strcmp (g_array_index (*array_, gchar*, 1), "1") == 0); - g_assert (strcmp (g_array_index (*array_, gchar*, 2), "2") == 0); - - g_array_remove_index (*array_, (*array_)->len - 1); - - g_array_prepend_val (*array_, val1); - g_array_prepend_val (*array_, val2); -} - -/** - * g_i_marshalling_tests_garray_utf8_full_inout: - * @array_: (inout) (element-type utf8) (transfer full): - */ -void -g_i_marshalling_tests_garray_utf8_full_inout (GArray **array_) -{ - static gchar *val1 = "-1"; - static gchar *val2 = "-2"; - gchar *val; - - g_assert ((*array_)->len == 3); - g_assert (strcmp (g_array_index (*array_, gchar*, 0), "0") == 0); - g_assert (strcmp (g_array_index (*array_, gchar*, 1), "1") == 0); - g_assert (strcmp (g_array_index (*array_, gchar*, 2), "2") == 0); - - g_free (g_array_index (*array_, gchar*, (*array_)->len - 1)); - g_array_remove_index (*array_, (*array_)->len - 1); - - val = g_strdup (val1); - g_array_prepend_val (*array_, val); - - val = g_strdup (val2); - g_array_prepend_val (*array_, val); -} - -/** * g_i_marshalling_tests_glist_int_none_return: * Returns: (element-type gint) (transfer none): */ diff --git a/gir/gimarshallingtests.h b/gir/gimarshallingtests.h index dd41866f..298f5443 100644 --- a/gir/gimarshallingtests.h +++ b/gir/gimarshallingtests.h @@ -296,26 +296,6 @@ void g_i_marshalling_tests_array_zero_terminated_out (gchar ***utf8s); void g_i_marshalling_tests_array_zero_terminated_inout (gchar ***utf8s); -/* GArray */ - -GArray *g_i_marshalling_tests_garray_int_none_return (void); -GArray *g_i_marshalling_tests_garray_utf8_none_return (void); -GArray *g_i_marshalling_tests_garray_utf8_container_return (void); -GArray *g_i_marshalling_tests_garray_utf8_full_return (void); - -void g_i_marshalling_tests_garray_int_none_in (GArray *array_); -void g_i_marshalling_tests_garray_utf8_none_in (GArray *array_); -void g_i_marshalling_tests_garray_utf8_container_in (GArray *array_); -void g_i_marshalling_tests_garray_utf8_full_in (GArray *array_); - -void g_i_marshalling_tests_garray_utf8_none_out (GArray **array_); -void g_i_marshalling_tests_garray_utf8_container_out (GArray **array_); -void g_i_marshalling_tests_garray_utf8_full_out (GArray **array_); - -void g_i_marshalling_tests_garray_utf8_none_inout (GArray **array_); -void g_i_marshalling_tests_garray_utf8_container_inout (GArray **array_); -void g_i_marshalling_tests_garray_utf8_full_inout (GArray **array_); - /* GList */ GList *g_i_marshalling_tests_glist_int_none_return (void); |