=?utf-8?q?=5Blibgdata=5D_build=3A_Only_call_g=5Ftype=5Finit=28=29_for_GLi?= =?utf-8?b?YiDiiaQgMi4zNS4w?=



commit adf2dd3171017430defa8e68792903724d1f9389
Author: Philip Withnall <philip tecnocode co uk>
Date:   Sun Oct 21 11:59:47 2012 +0100

    build: Only call g_type_init() for GLib â 2.35.0
    
    GLib master has just deprecated g_type_init() in favour of making it a
    compiler-supported constructor function.

 demos/scrapbook/scrapbook.c |    3 +++
 gdata/tests/common.c        |    2 ++
 gdata/tests/memory.c        |    2 ++
 gdata/tests/perf.c          |    2 ++
 4 files changed, 9 insertions(+), 0 deletions(-)
---
diff --git a/demos/scrapbook/scrapbook.c b/demos/scrapbook/scrapbook.c
index 46c4284..955d34a 100644
--- a/demos/scrapbook/scrapbook.c
+++ b/demos/scrapbook/scrapbook.c
@@ -644,7 +644,10 @@ main(int argc, char **argv)
 
 	scrapbook = g_slice_new (struct _ScrapData);
 	scrapbook->max_rows			= 5;
+
+#if !GLIB_CHECK_VERSION (2, 35, 0)
 	g_type_init ();
+#endif
 	gtk_init	(&argc, &argv);
 
 	scrapbook->currentCol 							= 0;
diff --git a/gdata/tests/common.c b/gdata/tests/common.c
index 551cb10..80f937d 100644
--- a/gdata/tests/common.c
+++ b/gdata/tests/common.c
@@ -37,7 +37,9 @@ gdata_test_init (int argc, char **argv)
 {
 	gint i;
 
+#if !GLIB_CHECK_VERSION (2, 35, 0)
 	g_type_init ();
+#endif
 
 	/* Parse the --no-internet and --no-interactive options */
 	for (i = 1; i < argc; i++) {
diff --git a/gdata/tests/memory.c b/gdata/tests/memory.c
index d7717d6..32dd0c2 100644
--- a/gdata/tests/memory.c
+++ b/gdata/tests/memory.c
@@ -64,7 +64,9 @@ main (int argc, char *argv[])
 {
 	g_mem_set_vtable (glib_mem_profiler_table);
 
+#if !GLIB_CHECK_VERSION (2, 35, 0)
 	g_type_init ();
+#endif
 
 	test_query_events ();
 
diff --git a/gdata/tests/perf.c b/gdata/tests/perf.c
index d58f793..80f8727 100644
--- a/gdata/tests/perf.c
+++ b/gdata/tests/perf.c
@@ -83,7 +83,9 @@ main (int argc, char *argv[])
 
 	#define ITERATIONS 10000
 
+#if !GLIB_CHECK_VERSION (2, 35, 0)
 	g_type_init ();
+#endif
 
 	/* Test feed parsing time */
 	g_get_current_time (&start_time);



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