g_hash_table_remove_all is glib 2.12+ only

Sun, 13 Jul 2008 19:55:55 +0000

author
Ka-Hing Cheung <khc@pidgin.im>
date
Sun, 13 Jul 2008 19:55:55 +0000
changeset 23852
71e357899bcf
parent 23851
3e5ce7442034
child 23853
8fcb0678c769

g_hash_table_remove_all is glib 2.12+ only

libpurple/protocols/msn/nexus.c file | annotate | diff | comparison | revisions
--- a/libpurple/protocols/msn/nexus.c	Sun Jul 13 18:29:05 2008 +0000
+++ b/libpurple/protocols/msn/nexus.c	Sun Jul 13 19:55:55 2008 +0000
@@ -267,7 +267,12 @@
 	if (token_str == NULL)
 		return FALSE;
 
+#if GLIB_CHECK_VERSION(2, 12, 0)
 	g_hash_table_remove_all(nexus->tokens[id].token);
+#else
+	g_hash_table_foreach_remove(nexus->tokens[id].token,
+		(GHRFunc)g_hash_table_lookup, NULL);
+#endif
 
 	elems = g_strsplit(token_str, "&", 0);
 

mercurial