From 8f80fbb2a7bbd140657247b328d6f010ed4d9157 Mon Sep 17 00:00:00 2001 From: Dan Winship Date: Mon, 3 Jun 2013 08:10:31 -0300 Subject: [PATCH] Remove some unnecessary source prepare/check functions GPollableSource and GSocket's "broken" source never trigger on their own, so with the changes to GSources in the last cycle, their check and prepare functions are unnecessary (and undesired). https://bugzilla.gnome.org/show_bug.cgi?id=701511 --- gio/gpollableutils.c | 18 ++---------------- gio/gsocket.c | 17 ++--------------- 2 files changed, 4 insertions(+), 31 deletions(-) diff --git a/gio/gpollableutils.c b/gio/gpollableutils.c index 1aa4fd061..e794ac611 100644 --- a/gio/gpollableutils.c +++ b/gio/gpollableutils.c @@ -41,20 +41,6 @@ typedef struct { GObject *stream; } GPollableSource; -static gboolean -pollable_source_prepare (GSource *source, - gint *timeout) -{ - *timeout = -1; - return FALSE; -} - -static gboolean -pollable_source_check (GSource *source) -{ - return FALSE; -} - static gboolean pollable_source_dispatch (GSource *source, GSourceFunc callback, @@ -100,8 +86,8 @@ pollable_source_closure_callback (GObject *stream, static GSourceFuncs pollable_source_funcs = { - pollable_source_prepare, - pollable_source_check, + NULL, + NULL, pollable_source_dispatch, pollable_source_finalize, (GSourceFunc)pollable_source_closure_callback, diff --git a/gio/gsocket.c b/gio/gsocket.c index 20f4b301b..7c1422b03 100644 --- a/gio/gsocket.c +++ b/gio/gsocket.c @@ -2915,19 +2915,6 @@ g_socket_is_closed (GSocket *socket) #ifdef G_OS_WIN32 /* Broken source, used on errors */ -static gboolean -broken_prepare (GSource *source, - gint *timeout) -{ - return FALSE; -} - -static gboolean -broken_check (GSource *source) -{ - return FALSE; -} - static gboolean broken_dispatch (GSource *source, GSourceFunc callback, @@ -2938,8 +2925,8 @@ broken_dispatch (GSource *source, static GSourceFuncs broken_funcs = { - broken_prepare, - broken_check, + NULL, + NULL, broken_dispatch, NULL };