From 9f9e7672b6b93dd0b49fdff7225fe95fc97eb452 Mon Sep 17 00:00:00 2001 From: monsta Date: Thu, 1 Sep 2016 13:42:22 +0300 Subject: drop some checks and code regarding glib < 2.14 --- src/dropbox-command-client.c | 18 +----------------- 1 file changed, 1 insertion(+), 17 deletions(-) (limited to 'src') diff --git a/src/dropbox-command-client.c b/src/dropbox-command-client.c index 817d989..29025bf 100644 --- a/src/dropbox-command-client.c +++ b/src/dropbox-command-client.c @@ -154,19 +154,6 @@ receive_args_until_done(GIOChannel *chan, GHashTable *return_table, return TRUE; } -static void my_g_hash_table_get_keys_helper(gpointer key, - gpointer value, - GList **ud) { - *ud = g_list_append(*ud, key); -} - -static GList *my_g_hash_table_get_keys(GHashTable *ght) { - GList *list = NULL; - g_hash_table_foreach(ght, (GHFunc) - my_g_hash_table_get_keys_helper, &list); - return list; -} - /* sends a command to the dropbox server returns an hash of the return values @@ -221,10 +208,7 @@ send_command_to_db(GIOChannel *chan, const gchar *command_name, if (args != NULL) { GList *keys, *li; - /* oh god */ - keys = glib_check_version(2, 14, 0) - ? my_g_hash_table_get_keys(args) - : g_hash_table_get_keys(args); + keys = g_hash_table_get_keys(args); for (li = keys; li != NULL; li = g_list_next(li)) { int i; -- cgit v1.2.1