pidgin: 3574e71d: Why create a wrapper function when you c...
markdoliner at pidgin.im
markdoliner at pidgin.im
Mon Apr 12 02:52:55 EDT 2010
-----------------------------------------------------------------
Revision: 3574e71d26419f0eb9995f57e3d422911e6aaea0
Ancestor: 40dca581f0e3d66f108176cb100ff915cfcf28a2
Author: markdoliner at pidgin.im
Date: 2010-04-12T06:45:18
Branch: im.pidgin.pidgin
URL: http://d.pidgin.im/viewmtn/revision/info/3574e71d26419f0eb9995f57e3d422911e6aaea0
Modified files:
pidgin/gtkeventloop.c
ChangeLog:
Why create a wrapper function when you can use g_free directly?
-------------- next part --------------
============================================================
--- pidgin/gtkeventloop.c c3eaafb3a71ae705da44fdbfe63c559d97982a18
+++ pidgin/gtkeventloop.c 7913f5a91693878ecd941cc3cb2fb8695c80ef8c
@@ -41,11 +41,6 @@ typedef struct _PidginIOClosure {
} 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 @@ static gboolean pidgin_io_invoke(GIOChan
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 @@ static gboolean pidgin_io_invoke(GIOChan
#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 @@ static guint pidgin_input_add(gint fd, P
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
More information about the Commits
mailing list