changeset 23585:fa7d5c8b5141

g_hash_table_remove_all is glib 2.12+ only
author Ka-Hing Cheung <khc@hxbc.us>
date Sun, 13 Jul 2008 19:55:55 +0000
parents 1f7191e0b24b
children 6f866008b325
files libpurple/protocols/msn/nexus.c
diffstat 1 files changed, 5 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- 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);