[grilo-plugins/0.1.x] plugins: g_thread_init() is deprecated
- From: Juan A. Suarez Romero <jasuarez src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [grilo-plugins/0.1.x] plugins: g_thread_init() is deprecated
- Date: Wed, 11 Jul 2012 08:52:59 +0000 (UTC)
commit c0d070c6d4756dac22d6a92ee88456200bed0e54
Author: Juan A. Suarez Romero <jasuarez igalia com>
Date: Sat May 26 17:40:12 2012 +0000
plugins: g_thread_init() is deprecated
For glib >= 2.32.0
src/media/upnp/grl-upnp.c | 2 ++
src/media/vimeo/grl-vimeo.c | 2 ++
src/media/youtube/grl-youtube.c | 2 ++
test/test_local_metadata.c | 2 ++
4 files changed, 8 insertions(+), 0 deletions(-)
---
diff --git a/src/media/upnp/grl-upnp.c b/src/media/upnp/grl-upnp.c
index 744fefb..3d5d074 100644
--- a/src/media/upnp/grl-upnp.c
+++ b/src/media/upnp/grl-upnp.c
@@ -153,10 +153,12 @@ grl_upnp_plugin_init (GrlPluginRegistry *registry,
GRL_DEBUG ("grl_upnp_plugin_init");
+#if !GLIB_CHECK_VERSION(2,32,0)
/* libsoup needs this */
if (!g_thread_supported()) {
g_thread_init (NULL);
}
+#endif
context_manager = gupnp_context_manager_new (NULL, 0);
g_signal_connect (context_manager,
diff --git a/src/media/vimeo/grl-vimeo.c b/src/media/vimeo/grl-vimeo.c
index 50c097f..2f1613a 100644
--- a/src/media/vimeo/grl-vimeo.c
+++ b/src/media/vimeo/grl-vimeo.c
@@ -95,9 +95,11 @@ grl_vimeo_plugin_init (GrlPluginRegistry *registry,
GRL_DEBUG ("vimeo_plugin_init");
+#if !GLIB_CHECK_VERSION(2,32,0)
if (!g_thread_supported ()) {
g_thread_init (NULL);
}
+#endif
if (!configs) {
GRL_INFO ("Configuration not provided! Plugin not loaded");
diff --git a/src/media/youtube/grl-youtube.c b/src/media/youtube/grl-youtube.c
index c6b2a70..195237d 100644
--- a/src/media/youtube/grl-youtube.c
+++ b/src/media/youtube/grl-youtube.c
@@ -273,10 +273,12 @@ grl_youtube_plugin_init (GrlPluginRegistry *registry,
return FALSE;
}
+#if !GLIB_CHECK_VERSION(2,32,0)
/* libgdata needs this */
if (!g_thread_supported()) {
g_thread_init (NULL);
}
+#endif
source = grl_youtube_source_new (api_key, YOUTUBE_CLIENT_ID);
diff --git a/test/test_local_metadata.c b/test/test_local_metadata.c
index b940e91..fb6c147 100644
--- a/test/test_local_metadata.c
+++ b/test/test_local_metadata.c
@@ -293,7 +293,9 @@ int
main(int argc, char **argv)
{
grl_init (&argc, &argv);
+#if !GLIB_CHECK_VERSION(2,32,0)
g_thread_init (NULL);
+#endif
loop = g_main_loop_new (g_main_context_default (), TRUE);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]