[aravis] all: avoid deprecation warning on g_type_init use.



commit 05a2f975430ebca213a5b61b317d9b97f1fb0fe6
Author: Emmanuel Pacaud <emmanuel gnome org>
Date:   Sun Apr 28 15:45:37 2013 +0200

    all: avoid deprecation warning on g_type_init use.

 src/arvfakegvcamera.c    |    2 +-
 src/arvmisc.h            |    6 ++++++
 src/arvtool.c            |    2 +-
 tests/arvcameratest.c    |    2 +-
 tests/arvevaluatortest.c |    2 +-
 tests/arvexample.c       |    2 +-
 tests/arvgenicamtest.c   |    2 +-
 tests/arvheartbeattest.c |    2 +-
 tests/arvtest.c          |    2 +-
 tests/arvziptest.c       |    2 +-
 tests/buffer.c           |    2 +-
 tests/evaluator.c        |    2 +-
 tests/fake.c             |    2 +-
 tests/genicam.c          |    2 +-
 tests/misc.c             |    2 +-
 15 files changed, 20 insertions(+), 14 deletions(-)
---
diff --git a/src/arvfakegvcamera.c b/src/arvfakegvcamera.c
index 699a866..72816b5 100644
--- a/src/arvfakegvcamera.c
+++ b/src/arvfakegvcamera.c
@@ -469,7 +469,7 @@ main (int argc, char **argv)
        GError *error = NULL;
 
        g_thread_init (NULL);
-       g_type_init ();
+       arv_g_type_init ();
 
        context = g_option_context_new (NULL);
        g_option_context_set_summary (context, "Fake GigEVision camera.");
diff --git a/src/arvmisc.h b/src/arvmisc.h
index 54f9de3..d447d1b 100644
--- a/src/arvmisc.h
+++ b/src/arvmisc.h
@@ -152,6 +152,12 @@ type_name##_get_type (void) \
 } /* closes type_name##_get_type() */
 #endif
 
+#if !GLIB_CHECK_VERSION(2,36,0)
+#define arv_g_type_init() g_type_init()
+#else
+#define arv_g_type_init()
+#endif
+
 G_END_DECLS
 
 #endif
diff --git a/src/arvtool.c b/src/arvtool.c
index a22c6c9..d7e2cfd 100644
--- a/src/arvtool.c
+++ b/src/arvtool.c
@@ -219,7 +219,7 @@ main (int argc, char **argv)
        unsigned int count = 0;
 
        g_thread_init (NULL);
-       g_type_init ();
+       arv_g_type_init ();
 
        context = g_option_context_new (" command <parameters>");
        g_option_context_set_summary (context, "Small utility for basic control of a Genicam device.");
diff --git a/tests/arvcameratest.c b/tests/arvcameratest.c
index aca8c09..4a16fca 100644
--- a/tests/arvcameratest.c
+++ b/tests/arvcameratest.c
@@ -166,7 +166,7 @@ main (int argc, char **argv)
        data.buffer_count = 0;
 
        g_thread_init (NULL);
-       g_type_init ();
+       arv_g_type_init ();
 
        context = g_option_context_new (NULL);
        g_option_context_add_main_entries (context, arv_option_entries, NULL);
diff --git a/tests/arvevaluatortest.c b/tests/arvevaluatortest.c
index b72794f..2e63c04 100644
--- a/tests/arvevaluatortest.c
+++ b/tests/arvevaluatortest.c
@@ -22,7 +22,7 @@ main (int argc, char **argv)
        int i;
        double value;
 
-       g_type_init ();
+       arv_g_type_init ();
 
        context = g_option_context_new (NULL);
        g_option_context_add_main_entries (context, arv_option_entries, NULL);
diff --git a/tests/arvexample.c b/tests/arvexample.c
index a77c56a..0ac9af2 100644
--- a/tests/arvexample.c
+++ b/tests/arvexample.c
@@ -67,7 +67,7 @@ main (int argc, char **argv)
        data.buffer_count = 0;
 
        /* Mandatory glib type system initialization */
-       g_type_init ();
+       arv_g_type_init ();
 
        /* Instantiation of the first available camera */
        camera = arv_camera_new (NULL);
diff --git a/tests/arvgenicamtest.c b/tests/arvgenicamtest.c
index fd404df..d0e04fb 100644
--- a/tests/arvgenicamtest.c
+++ b/tests/arvgenicamtest.c
@@ -23,7 +23,7 @@ main (int argc, char **argv)
        GError *error = NULL;
        int i;
 
-       g_type_init ();
+       arv_g_type_init ();
 
        context = g_option_context_new (NULL);
        g_option_context_add_main_entries (context, arv_option_entries, NULL);
diff --git a/tests/arvheartbeattest.c b/tests/arvheartbeattest.c
index 9fcaf2a..4c47a3b 100644
--- a/tests/arvheartbeattest.c
+++ b/tests/arvheartbeattest.c
@@ -58,7 +58,7 @@ int main(int argc, char *argv[])
     int i, payload;
 
     g_thread_init (NULL);
-    g_type_init ();
+    arv_g_type_init ();
 
     context = g_option_context_new (NULL);
     g_option_context_set_summary (context, "Test of heartbeat robustness while continuously changing a 
feature.");
diff --git a/tests/arvtest.c b/tests/arvtest.c
index f87a256..fc1a4ea 100644
--- a/tests/arvtest.c
+++ b/tests/arvtest.c
@@ -55,7 +55,7 @@ main (int argc, char **argv)
        int i;
 
        g_thread_init (NULL);
-       g_type_init ();
+       arv_g_type_init ();
 
        context = g_option_context_new (NULL);
        g_option_context_add_main_entries (context, arv_option_entries, NULL);
diff --git a/tests/arvziptest.c b/tests/arvziptest.c
index 9edbb4f..290c9f1 100644
--- a/tests/arvziptest.c
+++ b/tests/arvziptest.c
@@ -23,7 +23,7 @@ main (int argc, char **argv)
        GError *error = NULL;
        int i;
 
-       g_type_init ();
+       arv_g_type_init ();
 
        context = g_option_context_new (NULL);
        g_option_context_add_main_entries (context, arv_option_entries, NULL);
diff --git a/tests/buffer.c b/tests/buffer.c
index 68799c9..40c7cf0 100644
--- a/tests/buffer.c
+++ b/tests/buffer.c
@@ -75,7 +75,7 @@ main (int argc, char *argv[])
 
        g_test_init (&argc, &argv, NULL);
 
-       g_type_init ();
+       arv_g_type_init ();
 
        g_test_add_func ("/buffer/simple-buffer", simple_buffer_test);
        g_test_add_func ("/buffer/preallocated-buffer", preallocated_buffer_test);
diff --git a/tests/evaluator.c b/tests/evaluator.c
index 8f77ce3..100a555 100644
--- a/tests/evaluator.c
+++ b/tests/evaluator.c
@@ -142,7 +142,7 @@ main (int argc, char *argv[])
 
        g_test_init (&argc, &argv, NULL);
 
-       g_type_init ();
+       arv_g_type_init ();
 
        for (i = 0; i < G_N_ELEMENTS (expression_test_data); i++)
                g_test_add_data_func (expression_test_data[i].test_name,
diff --git a/tests/fake.c b/tests/fake.c
index 02a6c35..5a68bf0 100644
--- a/tests/fake.c
+++ b/tests/fake.c
@@ -184,7 +184,7 @@ main (int argc, char *argv[])
 
        g_test_init (&argc, &argv, NULL);
 
-       g_type_init ();
+       arv_g_type_init ();
 
        arv_set_fake_camera_genicam_filename (GENICAM_FILENAME);
 
diff --git a/tests/genicam.c b/tests/genicam.c
index 3180b0b..47b633e 100644
--- a/tests/genicam.c
+++ b/tests/genicam.c
@@ -344,7 +344,7 @@ main (int argc, char *argv[])
 
        g_test_init (&argc, &argv, NULL);
 
-       g_type_init ();
+       arv_g_type_init ();
 
        arv_set_fake_camera_genicam_filename (GENICAM_FILENAME);
 
diff --git a/tests/misc.c b/tests/misc.c
index b088000..bff9dc4 100644
--- a/tests/misc.c
+++ b/tests/misc.c
@@ -42,7 +42,7 @@ main (int argc, char *argv[])
 
        g_test_init (&argc, &argv, NULL);
 
-       g_type_init ();
+       arv_g_type_init ();
 
        g_test_add_func ("/buffer/unaligned-from-le", unaligned_from_le_ptr_test);
 


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