From: Dan Winship Date: Mon, 3 Jun 2013 11:10:31 +0000 (-0300) Subject: Remove some unnecessary source prepare/check functions X-Git-Tag: 2.37.5~46 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=8f80fbb2a7bbd140657247b328d6f010ed4d9157;p=platform%2Fupstream%2Fglib.git 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 --- diff --git a/gio/gpollableutils.c b/gio/gpollableutils.c index 1aa4fd0..e794ac6 100644 --- a/gio/gpollableutils.c +++ b/gio/gpollableutils.c @@ -42,20 +42,6 @@ typedef struct { } 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, gpointer user_data) @@ -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 20f4b30..7c1422b 100644 --- a/gio/gsocket.c +++ b/gio/gsocket.c @@ -2916,19 +2916,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, gpointer user_data) @@ -2938,8 +2925,8 @@ broken_dispatch (GSource *source, static GSourceFuncs broken_funcs = { - broken_prepare, - broken_check, + NULL, + NULL, broken_dispatch, NULL };