/pidgin/main: 600840d3102e: Remove unnecessary GLIB_CHECK_VERSION

Mark Doliner mark at kingant.net
Thu Jan 10 02:41:00 EST 2013


Changeset: 600840d3102eede240880fdb2a20c5d4864e9dc0
Author:	 Mark Doliner <mark at kingant.net>
Date:	 2013-01-09 23:20 -0800
Branch:	 default
URL: http://hg.pidgin.im/pidgin/main/rev/600840d3102e

Description:

Remove unnecessary GLIB_CHECK_VERSION

Our top-level configure.ac requires glib 2.16, so this check is not
needed.  Also this code looks like it leaks... it sets a value to NULL
before trying to free it.

diffstat:

 libpurple/protocols/oscar/oscar.c |  14 --------------
 1 files changed, 0 insertions(+), 14 deletions(-)

diffs (32 lines):

diff --git a/libpurple/protocols/oscar/oscar.c b/libpurple/protocols/oscar/oscar.c
--- a/libpurple/protocols/oscar/oscar.c
+++ b/libpurple/protocols/oscar/oscar.c
@@ -633,15 +633,6 @@ compare_handlers(gconstpointer a, gconst
 	return subtype1 - subtype2;
 }
 
-#if !GLIB_CHECK_VERSION(2,14,0)
-static void hash_table_get_list_of_keys(gpointer key, gpointer value, gpointer user_data)
-{
-	GList **handlers = (GList **)user_data;
-
-	*handlers = g_list_prepend(*handlers, key);
-}
-#endif /* GLIB < 2.14.0 */
-
 void
 oscar_login(PurpleAccount *account)
 {
@@ -711,12 +702,7 @@ oscar_login(PurpleAccount *account)
 	oscar_data_addhandler(od, SNAC_FAMILY_USERLOOKUP, 0x0003, purple_parse_searchreply, 0);
 
 	g_string_append(msg, "Registered handlers: ");
-#if GLIB_CHECK_VERSION(2,14,0)
 	handlers = g_hash_table_get_keys(od->handlerlist);
-#else
-	handlers = NULL;
-	g_hash_table_foreach(od->handlerlist, hash_table_get_list_of_keys, &handlers);
-#endif /* GLIB < 2.14.0 */
 	sorted_handlers = g_list_sort(g_list_copy(handlers), compare_handlers);
 	for (cur = sorted_handlers; cur; cur = cur->next) {
 		guint x = GPOINTER_TO_UINT(cur->data);



More information about the Commits mailing list