[glib-networking/mcatanzaro/gsourcefuncs: 2/2] Remove unnecessary stub prepare/dispatch funcs



commit a39e1bc6182c3a053fe6a3bb22866c0c51e33e3c
Author: Michael Catanzaro <mcatanzaro igalia com>
Date:   Mon Jul 1 20:13:22 2019 -0500

    Remove unnecessary stub prepare/dispatch funcs
    
    Since GLib 2.36 we can pass NULL to get these exact same stub
    implementations.

 tls/base/gtlsconnection-base.c | 22 ++++------------------
 1 file changed, 4 insertions(+), 18 deletions(-)
---
diff --git a/tls/base/gtlsconnection-base.c b/tls/base/gtlsconnection-base.c
index 812aae5..b1225f5 100644
--- a/tls/base/gtlsconnection-base.c
+++ b/tls/base/gtlsconnection-base.c
@@ -830,20 +830,6 @@ typedef struct {
   gboolean            op_waiting;
 } GTlsConnectionBaseSource;
 
-static gboolean
-tls_source_prepare (GSource *source,
-                    gint    *timeout)
-{
-  *timeout = -1;
-  return FALSE;
-}
-
-static gboolean
-tls_source_check (GSource *source)
-{
-  return FALSE;
-}
-
 /* Use a custom dummy callback instead of g_source_set_dummy_callback(), as that
  * uses a GClosure and is slow. (The GClosure is necessary to deal with any
  * function prototype.) */
@@ -993,8 +979,8 @@ g_tls_connection_tls_source_dtls_closure_callback (GObject      *stream,
 
 static GSourceFuncs tls_source_funcs =
 {
-  tls_source_prepare,
-  tls_source_check,
+  NULL,
+  NULL,
   tls_source_dispatch,
   tls_source_finalize,
   (GSourceFunc)g_tls_connection_tls_source_closure_callback,
@@ -1003,8 +989,8 @@ static GSourceFuncs tls_source_funcs =
 
 static GSourceFuncs dtls_source_funcs =
 {
-  tls_source_prepare,
-  tls_source_check,
+  NULL,
+  NULL,
   tls_source_dispatch,
   tls_source_finalize,
   (GSourceFunc)g_tls_connection_tls_source_dtls_closure_callback,


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]