[tracker] libtracker-common: Remove unused tracker_dbus_results_ptr_array_free



commit 9d9f08a063737f7b2b4f7d541e2ea048cf3827da
Author: Jürg Billeter <j bitron ch>
Date:   Tue Dec 28 09:27:17 2010 +0100

    libtracker-common: Remove unused tracker_dbus_results_ptr_array_free

 src/libtracker-common/tracker-dbus.c        |   12 ------------
 src/libtracker-common/tracker-dbus.h        |    1 -
 tests/libtracker-common/tracker-dbus-test.c |   25 -------------------------
 3 files changed, 0 insertions(+), 38 deletions(-)
---
diff --git a/src/libtracker-common/tracker-dbus.c b/src/libtracker-common/tracker-dbus.c
index 9ee4e53..181fb62 100644
--- a/src/libtracker-common/tracker-dbus.c
+++ b/src/libtracker-common/tracker-dbus.c
@@ -331,18 +331,6 @@ tracker_dbus_slist_to_strv (GSList *list)
 	return strv;
 }
 
-void
-tracker_dbus_results_ptr_array_free (GPtrArray **ptr_array)
-{
-	if (!ptr_array || !(*ptr_array)) {
-		return;
-	}
-
-	g_ptr_array_foreach (*ptr_array, (GFunc) g_strfreev, NULL);
-	g_ptr_array_free (*ptr_array, TRUE);
-	*ptr_array = NULL;
-}
-
 guint
 tracker_dbus_get_next_request_id (void)
 {
diff --git a/src/libtracker-common/tracker-dbus.h b/src/libtracker-common/tracker-dbus.h
index 3e8f715..e2e8159 100644
--- a/src/libtracker-common/tracker-dbus.h
+++ b/src/libtracker-common/tracker-dbus.h
@@ -125,7 +125,6 @@ GQuark           tracker_dbus_error_quark            (void);
 
 /* Utils */
 gchar **         tracker_dbus_slist_to_strv          (GSList                     *list);
-void             tracker_dbus_results_ptr_array_free (GPtrArray                 **ptr_array);
 
 /* Requests */
 guint            tracker_dbus_get_next_request_id    (void);
diff --git a/tests/libtracker-common/tracker-dbus-test.c b/tests/libtracker-common/tracker-dbus-test.c
index 08c4af0..de2f0cb 100644
--- a/tests/libtracker-common/tracker-dbus-test.c
+++ b/tests/libtracker-common/tracker-dbus-test.c
@@ -86,29 +86,6 @@ test_async_queue_to_strv_nonutf8 (void)
 #endif
 
 static void
-test_results_ptr_array_free (void)
-{
-	GPtrArray *array = NULL;
-
-	/* NULL */
-	tracker_dbus_results_ptr_array_free (&array);
-
-	/* Empty */
-	array = g_ptr_array_new ();
-	g_assert (array != NULL);
-
-	tracker_dbus_results_ptr_array_free (&array);
-	g_assert (array == NULL);
-
-	/* With contents */
-	array = g_ptr_array_new ();
-	g_ptr_array_add (array, g_strsplit ("one two three", " ", -1));
-
-	tracker_dbus_results_ptr_array_free (&array);
-	g_assert (array == NULL);
-}
-
-static void
 test_dbus_request_failed (void)
 {
 	GError *error = NULL;
@@ -412,8 +389,6 @@ main (int argc, char **argv) {
 
 	g_test_add_func ("/libtracker-common/tracker-dbus/slist_to_strv_ok", 
                          test_slist_to_strv);
-	g_test_add_func ("/libtracker-common/tracker-dbus/free_ptr_array", 
-                         test_results_ptr_array_free);
         g_test_add_func ("/libtracker-common/tracker-dbus/request",
                          test_dbus_request);
         g_test_add_func ("/libtracker-common/tracker-dbus/request-client-lookup",



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