[glib] Drop g_thread_init from tests



commit c173c0beb4e0f664faf616bd6475b6c5c1aa50fb
Author: Matthias Clasen <mclasen redhat com>
Date:   Mon Apr 2 07:59:23 2012 -0400

    Drop g_thread_init from tests
    
    This is not needed anymore.

 tests/refcount/Makefile.am   |    3 +--
 tests/refcount/closures.c    |    1 -
 tests/refcount/objects.c     |    1 -
 tests/refcount/objects2.c    |    3 +--
 tests/refcount/properties.c  |    1 -
 tests/refcount/properties2.c |    1 -
 tests/refcount/properties3.c |    2 --
 tests/refcount/signals.c     |    4 ----
 8 files changed, 2 insertions(+), 14 deletions(-)
---
diff --git a/tests/refcount/Makefile.am b/tests/refcount/Makefile.am
index 1c7d716..49a5dc2 100644
--- a/tests/refcount/Makefile.am
+++ b/tests/refcount/Makefile.am
@@ -6,11 +6,10 @@ INCLUDES =					\
 	$(GLIB_DEBUG_FLAGS)
 
 libglib = $(top_builddir)/glib/libglib-2.0.la
-libgthread = $(top_builddir)/gthread/libgthread-2.0.la
 libgmodule = $(top_builddir)/gmodule/libgmodule-2.0.la
 libgobject = $(top_builddir)/gobject/libgobject-2.0.la
 
-LDADD = $(libglib) $(libgobject) $(libgthread) $(G_THREAD_LIBS)
+LDADD = $(libglib) $(libgobject)
 
 test_programs = 				\
 	closures				\
diff --git a/tests/refcount/closures.c b/tests/refcount/closures.c
index 5bd20a0..d0a64f0 100644
--- a/tests/refcount/closures.c
+++ b/tests/refcount/closures.c
@@ -241,7 +241,6 @@ main (int    argc,
   GTest *object;
   guint i;
 
-  g_thread_init (NULL);
   g_print ("START: %s\n", argv[0]);
   g_log_set_always_fatal (G_LOG_LEVEL_WARNING | G_LOG_LEVEL_CRITICAL | g_log_set_always_fatal (G_LOG_FATAL_MASK));
   g_type_init ();
diff --git a/tests/refcount/objects.c b/tests/refcount/objects.c
index 1c40c64..230a160 100644
--- a/tests/refcount/objects.c
+++ b/tests/refcount/objects.c
@@ -117,7 +117,6 @@ main (int argc, char **argv)
   GArray *test_threads;
   const guint n_threads = 5;
 
-  g_thread_init (NULL);
   g_print ("START: %s\n", argv[0]);
   g_log_set_always_fatal (G_LOG_LEVEL_WARNING | G_LOG_LEVEL_CRITICAL | g_log_set_always_fatal (G_LOG_FATAL_MASK));
   g_type_init ();
diff --git a/tests/refcount/objects2.c b/tests/refcount/objects2.c
index b57863d..66a076b 100644
--- a/tests/refcount/objects2.c
+++ b/tests/refcount/objects2.c
@@ -101,7 +101,6 @@ main (int argc, char **argv)
   gint i;
   GTest *test;
 
-  g_thread_init (NULL);
   g_print ("START: %s\n", argv[0]);
   g_log_set_always_fatal (G_LOG_LEVEL_WARNING | G_LOG_LEVEL_CRITICAL | g_log_set_always_fatal (G_LOG_FATAL_MASK));
   g_type_init ();
@@ -113,6 +112,6 @@ main (int argc, char **argv)
   }
 
   g_print ("\n");
-  
+
   return 0;
 }
diff --git a/tests/refcount/properties.c b/tests/refcount/properties.c
index a69e3ec..f7c2928 100644
--- a/tests/refcount/properties.c
+++ b/tests/refcount/properties.c
@@ -194,7 +194,6 @@ main (int argc, char **argv)
   GArray *test_threads;
   const gint n_threads = 5;
 
-  g_thread_init (NULL);
   g_print ("START: %s\n", argv[0]);
   g_log_set_always_fatal (G_LOG_LEVEL_WARNING | G_LOG_LEVEL_CRITICAL | g_log_set_always_fatal (G_LOG_FATAL_MASK));
   g_type_init ();
diff --git a/tests/refcount/properties2.c b/tests/refcount/properties2.c
index 90ea42b..3bef8e5 100644
--- a/tests/refcount/properties2.c
+++ b/tests/refcount/properties2.c
@@ -178,7 +178,6 @@ main (int argc, char **argv)
   gint i;
   GTest *test;
 
-  g_thread_init (NULL);
   g_print ("START: %s\n", argv[0]);
   g_log_set_always_fatal (G_LOG_LEVEL_WARNING | G_LOG_LEVEL_CRITICAL | g_log_set_always_fatal (G_LOG_FATAL_MASK));
   g_type_init ();
diff --git a/tests/refcount/properties3.c b/tests/refcount/properties3.c
index 56661d6..66f68b5 100644
--- a/tests/refcount/properties3.c
+++ b/tests/refcount/properties3.c
@@ -159,8 +159,6 @@ main (int argc, char **argv)
   GArray *test_threads;
   const gint n_threads = 5;
 
-  g_thread_init (NULL);
-
   g_print ("START: %s\n", argv[0]);
   g_log_set_always_fatal (G_LOG_LEVEL_WARNING | G_LOG_LEVEL_CRITICAL | g_log_set_always_fatal (G_LOG_FATAL_MASK));
   g_type_init ();
diff --git a/tests/refcount/signals.c b/tests/refcount/signals.c
index 90bae41..b8b4c45 100644
--- a/tests/refcount/signals.c
+++ b/tests/refcount/signals.c
@@ -98,9 +98,6 @@ my_test_class_init (GTestClass * klass)
 
   parent_class = g_type_class_ref (G_TYPE_OBJECT);
 
-  if (!g_thread_supported ())
-    g_thread_init (NULL);
-
   gobject_class->dispose = my_test_dispose;
   gobject_class->set_property = my_test_set_property;
   gobject_class->get_property = my_test_get_property;
@@ -239,7 +236,6 @@ main (int argc, char **argv)
   GArray *test_threads;
   const gint n_threads = 1;
 
-  g_thread_init (NULL);
   g_print ("START: %s\n", argv[0]);
   g_log_set_always_fatal (G_LOG_LEVEL_WARNING | G_LOG_LEVEL_CRITICAL | g_log_set_always_fatal (G_LOG_FATAL_MASK));
   g_type_init ();



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