[gdk-pixbuf] Drop unneeded use of deprecated GLib thread API



commit ecdb61b6b3718826b3be930c997bdcc2a1279e16
Author: Matthias Clasen <mclasen redhat com>
Date:   Tue Aug 2 13:47:33 2016 -0400

    Drop unneeded use of deprecated GLib thread API
    
    Threads have always been initializes, since 2011. Time
    to drop this.

 gdk-pixbuf/gdk-pixbuf-io.c |   12 ++----------
 1 files changed, 2 insertions(+), 10 deletions(-)
---
diff --git a/gdk-pixbuf/gdk-pixbuf-io.c b/gdk-pixbuf/gdk-pixbuf-io.c
index 3b84084..f5a9081 100644
--- a/gdk-pixbuf/gdk-pixbuf-io.c
+++ b/gdk-pixbuf/gdk-pixbuf-io.c
@@ -814,20 +814,12 @@ _gdk_pixbuf_load_module (GdkPixbufModule *image_module,
                          GError         **error)
 {
         gboolean ret;
-        gboolean locked = FALSE;
 
-        /* be extra careful, maybe the module initializes
-         * the thread system
-         */
-        if (g_threads_got_initialized) {
-                G_LOCK (init_lock);
-                locked = TRUE;
-        }
+        G_LOCK (init_lock);
 
         ret = gdk_pixbuf_load_module_unlocked (image_module, error);
 
-        if (locked)
-                G_UNLOCK (init_lock);
+        G_UNLOCK (init_lock);
 
         return ret;
 }


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