[gobject-introspection] [dumper] Fix threads initialization



commit ffd9b39620c9665a8685363202b4f02fa895288c
Author: Colin Walters <walters verbum org>
Date:   Wed Dec 2 12:56:52 2009 -0500

    [dumper] Fix threads initialization
    
    Correctly guard with g_thread_supported, call g_thread_init before
    g_type_init.

 giscanner/dumper.py |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/giscanner/dumper.py b/giscanner/dumper.py
index 0ca8272..b11768c 100644
--- a/giscanner/dumper.py
+++ b/giscanner/dumper.py
@@ -46,8 +46,8 @@ main(int argc, char **argv)
   GOptionContext *context;
   GError *error = NULL;
 
+  if (!g_thread_supported ()) g_thread_init (NULL);
   g_type_init ();
-  g_thread_init (NULL);
 
   context = g_option_context_new ("");
   g_option_context_add_main_entries (context, entries, "girepository-1.0");



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