[gdk-pixbuf] More deprecation cleanup



commit 9f331218c98f16da1361d50aa6f580af61d61e11
Author: Matthias Clasen <mclasen redhat com>
Date:   Thu Jan 10 07:49:44 2013 -0500

    More deprecation cleanup
    
    Avoid deprecation warnings for g_type_init and g_thread_init.

 tests/pixbuf-lowmem.c            |    2 ++
 tests/pixbuf-random.c            |    2 ++
 tests/pixbuf-randomly-modified.c |    4 +++-
 tests/pixbuf-read.c              |    4 +++-
 tests/pixbuf-threads.c           |    6 +++++-
 5 files changed, 15 insertions(+), 3 deletions(-)
---
diff --git a/tests/pixbuf-lowmem.c b/tests/pixbuf-lowmem.c
index 172c162..ae4fb47 100644
--- a/tests/pixbuf-lowmem.c
+++ b/tests/pixbuf-lowmem.c
@@ -197,7 +197,9 @@ main (int argc, char **argv)
   /* Set a malloc which emulates low mem */
   g_mem_set_vtable (&limited_table);
   
+#if !GLIB_CHECK_VERSION (2, 35, 3)
   g_type_init ();
+#endif
   g_log_set_always_fatal (G_LOG_LEVEL_WARNING | G_LOG_LEVEL_ERROR | G_LOG_LEVEL_CRITICAL);
   
   /* memory tests */
diff --git a/tests/pixbuf-random.c b/tests/pixbuf-random.c
index e94b631..c1cabb5 100644
--- a/tests/pixbuf-random.c
+++ b/tests/pixbuf-random.c
@@ -126,7 +126,9 @@ main (int argc, char **argv)
     }
   g_print ("the last tested image is saved to the file \"pixbuf-random-image\"\n\n");
 
+#if !GLIB_CHECK_VERSION (2, 35, 3)
   g_type_init ();
+#endif
   g_log_set_always_fatal (G_LOG_LEVEL_WARNING | G_LOG_LEVEL_ERROR | G_LOG_LEVEL_CRITICAL);
   
   g_random_set_seed (seed);
diff --git a/tests/pixbuf-randomly-modified.c b/tests/pixbuf-randomly-modified.c
index fb9eac7..9d3efe8 100644
--- a/tests/pixbuf-randomly-modified.c
+++ b/tests/pixbuf-randomly-modified.c
@@ -129,8 +129,10 @@ main (int argc, char **argv)
   g_random_set_seed (seed);
 
   g_print ("the last tested image is saved to pixbuf-randomly-modified-image\n");
-  
+
+#if !GLIB_CHECK_VERSION (2, 35, 3)
   g_type_init ();
+#endif
   g_log_set_always_fatal (G_LOG_LEVEL_WARNING | G_LOG_LEVEL_ERROR | G_LOG_LEVEL_CRITICAL);
 
   for (;;)
diff --git a/tests/pixbuf-read.c b/tests/pixbuf-read.c
index a65af3f..c2e3300 100644
--- a/tests/pixbuf-read.c
+++ b/tests/pixbuf-read.c
@@ -51,8 +51,10 @@ int
 main (int argc, char **argv)
 {
   int i;
-  
+
+#if !GLIB_CHECK_VERSION (2, 35, 3)
   g_type_init ();
+#endif
   g_log_set_always_fatal (G_LOG_LEVEL_WARNING | G_LOG_LEVEL_ERROR | G_LOG_LEVEL_CRITICAL);
 
   if (argc == 1)
diff --git a/tests/pixbuf-threads.c b/tests/pixbuf-threads.c
index 267efe9..c0118fd 100644
--- a/tests/pixbuf-threads.c
+++ b/tests/pixbuf-threads.c
@@ -86,11 +86,15 @@ main (int argc, char **argv)
 {
   int i, start;
   GThreadPool *pool;
-  
+
+#if !GLIB_CHECK_VERSION (2, 35, 3)
   g_type_init ();
+#endif
 
+#if !GLIB_CHECK_VERSION (2, 32, 0)
   if (!g_thread_supported ())
     g_thread_init (NULL);
+#endif
 
   g_log_set_always_fatal (G_LOG_LEVEL_WARNING | G_LOG_LEVEL_ERROR | G_LOG_LEVEL_CRITICAL);
 



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