Mercurial > pidgin
changeset 29709:fd2d15e57763
Why create a wrapper function when you can use g_free directly?
author | Mark Doliner <mark@kingant.net> |
---|---|
date | Mon, 12 Apr 2010 06:45:18 +0000 |
parents | ae2b1f9bde75 |
children | ac49f12cddeb |
files | pidgin/gtkeventloop.c |
diffstat | 1 files changed, 4 insertions(+), 9 deletions(-) [+] |
line wrap: on
line diff
--- a/pidgin/gtkeventloop.c Mon Apr 12 03:42:03 2010 +0000 +++ b/pidgin/gtkeventloop.c Mon Apr 12 06:45:18 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