mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2024-12-25 15:06:14 +01:00
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
This commit is contained in:
parent
6d328a0d5d
commit
8f80fbb2a7
@ -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,
|
||||
|
@ -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
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user