From 43357db91fd411dfc6caa9b5572f429b79e5adca Mon Sep 17 00:00:00 2001 From: Morten Mjelva Date: Fri, 17 Jun 2011 14:29:22 +0100 Subject: [PATCH] Factor out _tp_destroy_socket_control_list() to tests/lib/util https://bugs.freedesktop.org/show_bug.cgi?id=38997 --- tests/lib/stream-tube-chan.c | 9 +-------- tests/lib/util.c | 7 +++++++ tests/lib/util.h | 2 ++ 3 files changed, 10 insertions(+), 8 deletions(-) diff --git a/tests/lib/stream-tube-chan.c b/tests/lib/stream-tube-chan.c index 207f95d..803c386 100644 --- a/tests/lib/stream-tube-chan.c +++ b/tests/lib/stream-tube-chan.c @@ -56,13 +56,6 @@ struct _TpTestsStreamTubeChannelPrivate { }; static void -destroy_socket_control_list (gpointer data) -{ - GArray *tab = data; - g_array_free (tab, TRUE); -} - -static void create_supported_socket_types (TpTestsStreamTubeChannel *self) { TpSocketAccessControl access_control; @@ -70,7 +63,7 @@ create_supported_socket_types (TpTestsStreamTubeChannel *self) g_assert (self->priv->supported_socket_types == NULL); self->priv->supported_socket_types = g_hash_table_new_full (NULL, NULL, - NULL, destroy_socket_control_list); + NULL, _tp_destroy_socket_control_list); /* Socket_Address_Type_Unix */ unix_tab = g_array_sized_new (FALSE, FALSE, sizeof (TpSocketAccessControl), diff --git a/tests/lib/util.c b/tests/lib/util.c index 224ceff..d18647b 100644 --- a/tests/lib/util.c +++ b/tests/lib/util.c @@ -310,6 +310,13 @@ tp_tests_init (int *argc, g_test_init (argc, argv, NULL); } +void +_tp_destroy_socket_control_list (gpointer data) +{ + GArray *tab = data; + g_array_free (tab, TRUE); +} + GValue * _tp_create_local_socket (TpSocketAddressType address_type, TpSocketAccessControl access_control, diff --git a/tests/lib/util.h b/tests/lib/util.h index 5a49c28..d170eab 100644 --- a/tests/lib/util.h +++ b/tests/lib/util.h @@ -63,4 +63,6 @@ GValue *_tp_create_local_socket (TpSocketAddressType address_type, gchar **unix_address, GError **error); +void _tp_destroy_socket_control_list (gpointer data); + #endif /* #ifndef __TP_TESTS_LIB_UTIL_H__ */ -- 1.7.4.1