diff pidgin/gtkeventloop.c @ 30909:25e200cb3532

propagate from branch 'im.pidgin.pidgin' (head dca20e09164518b0f7a773edd7e9649f41d8873d) to branch 'im.pidgin.cpw.malu.xmpp.google_refactor' (head 7823c556f2d1bbca43f5ef9f0fea30cabc5d313f)
author Marcus Lundblad <ml@update.uu.se>
date Tue, 31 Aug 2010 18:28:10 +0000
parents 48e15c705add
children
line wrap: on
line diff
--- a/pidgin/gtkeventloop.c	Fri Apr 09 22:14:51 2010 +0000
+++ b/pidgin/gtkeventloop.c	Tue Aug 31 18:28:10 2010 +0000
@@ -41,11 +41,6 @@
 
 } PidginIOClosure;
 
-static void pidgin_io_destroy(gpointer data)
-{
-	g_free(data);
-}
-
 static gboolean pidgin_io_invoke(GIOChannel *source, GIOCondition condition, gpointer data)
 {
 	PidginIOClosure *closure = data;
@@ -57,7 +52,7 @@
 		purple_cond |= PURPLE_INPUT_WRITE;
 
 #if 0
-	purple_debug(PURPLE_DEBUG_MISC, "gtk_eventloop",
+	purple_debug_misc("gtk_eventloop",
 			   "CLOSURE: callback for %d, fd is %d\n",
 			   closure->result, g_io_channel_unix_get_fd(source));
 #endif
@@ -65,7 +60,7 @@
 #ifdef _WIN32
 	if(! purple_cond) {
 #ifdef DEBUG
-		purple_debug(PURPLE_DEBUG_MISC, "gtk_eventloop",
+		purple_debug_misc("gtk_eventloop",
 			   "CLOSURE received GIOCondition of 0x%x, which does not"
 			   " match 0x%x (READ) or 0x%x (WRITE)\n",
 			   condition, PIDGIN_READ_COND, PIDGIN_WRITE_COND);
@@ -110,10 +105,10 @@
 	channel = g_io_channel_unix_new(fd);
 
 	closure->result = g_io_add_watch_full(channel, G_PRIORITY_DEFAULT, cond,
-					      pidgin_io_invoke, closure, pidgin_io_destroy);
+					      pidgin_io_invoke, closure, g_free);
 
 #if 0
-	purple_debug(PURPLE_DEBUG_MISC, "gtk_eventloop",
+	purple_debug_misc("gtk_eventloop",
 			   "CLOSURE: adding input watcher %d for fd %d\n",
 			   closure->result, fd);
 #endif