/pidgin/main: 3c73956dbeca: Ignore some deprecations.

Elliott Sales de Andrade qulogic at pidgin.im
Mon Apr 1 18:03:52 EDT 2013


Changeset: 3c73956dbecaa9c71576cbcb1f08600ba3723508
Author:	 Elliott Sales de Andrade <qulogic at pidgin.im>
Date:	 2013-02-04 21:56 -0500
Branch:	 default
URL: https://hg.pidgin.im/pidgin/main/rev/3c73956dbeca

Description:

Ignore some deprecations.

These GValueArray things are forced on us by GStreamer, so until they
change their API, the warnings won't be going away.

diffstat:

 libpurple/glibcompat.h        |   8 ++++++++
 libpurple/media/backend-fs2.c |  14 ++++++++++----
 pidgin/gtkprefs.c             |   2 ++
 3 files changed, 20 insertions(+), 4 deletions(-)

diffs (85 lines):

diff --git a/libpurple/glibcompat.h b/libpurple/glibcompat.h
--- a/libpurple/glibcompat.h
+++ b/libpurple/glibcompat.h
@@ -25,6 +25,11 @@
  * Also, any public API should not depend on this file.
  */
 
+#if !GLIB_CHECK_VERSION(2, 32, 0)
+
+#define G_GNUC_BEGIN_IGNORE_DEPRECATIONS
+#define G_GNUC_END_IGNORE_DEPRECATIONS
+
 #if !GLIB_CHECK_VERSION(2, 28, 0)
 
 static inline gint64 g_get_monotonic_time(void)
@@ -50,4 +55,7 @@ static inline void g_slist_free_full(GSL
 
 #endif /* 2.28.0 */
 
+#endif /* 2.32.0 */
+
 #endif /* _PIDGINGLIBCOMPAT_H_ */
+
diff --git a/libpurple/media/backend-fs2.c b/libpurple/media/backend-fs2.c
--- a/libpurple/media/backend-fs2.c
+++ b/libpurple/media/backend-fs2.c
@@ -826,7 +826,9 @@ gst_msg_db_to_percent(GstMessage *msg, g
 
 	list = gst_structure_get_value(gst_message_get_structure(msg), value_name);
 #if GST_CHECK_VERSION(1,0,0)
+G_GNUC_BEGIN_IGNORE_DEPRECATIONS
 	value = g_value_array_get_nth(g_value_get_boxed(list), 0);
+G_GNUC_END_IGNORE_DEPRECATIONS
 #else
 	value = gst_value_list_get_value(list, 0);
 #endif
@@ -1894,7 +1896,9 @@ append_relay_info(GValueArray *relay_inf
 		memset(&value, 0, sizeof(GValue));
 		g_value_init(&value, GST_TYPE_STRUCTURE);
 		gst_value_set_structure(&value, turn_setup);
+G_GNUC_BEGIN_IGNORE_DEPRECATIONS
 		relay_info = g_value_array_append(relay_info, &value);
+G_GNUC_END_IGNORE_DEPRECATIONS
 		gst_structure_free(turn_setup);
 	}
 
@@ -1989,7 +1993,9 @@ create_stream(PurpleMediaBackendFs2 *sel
 	}
 
 	if (turn_ip && !strcmp("nice", transmitter) && !got_turn_from_prpl) {
+G_GNUC_BEGIN_IGNORE_DEPRECATIONS
 		GValueArray *relay_info = g_value_array_new(0);
+G_GNUC_END_IGNORE_DEPRECATIONS
 		gint port;
 		const gchar *username =	purple_prefs_get_string(
 				"/purple/network/turn_username");
@@ -2016,11 +2022,11 @@ create_stream(PurpleMediaBackendFs2 *sel
 		purple_debug_info("backend-fs2",
 			"Setting relay-info on new stream\n");
 		_params[_num_params].name = "relay-info";
-		g_value_init(&_params[_num_params].value,
-			G_TYPE_VALUE_ARRAY);
-		g_value_set_boxed(&_params[_num_params].value,
-			relay_info);
+G_GNUC_BEGIN_IGNORE_DEPRECATIONS
+		g_value_init(&_params[_num_params].value, G_TYPE_VALUE_ARRAY);
+		g_value_set_boxed(&_params[_num_params].value, relay_info);
 		g_value_array_free(relay_info);
+G_GNUC_END_IGNORE_DEPRECATIONS
 		_num_params++;
 	}
 
diff --git a/pidgin/gtkprefs.c b/pidgin/gtkprefs.c
--- a/pidgin/gtkprefs.c
+++ b/pidgin/gtkprefs.c
@@ -3309,7 +3309,9 @@ gst_msg_db_to_percent(GstMessage *msg, g
 
 	list = gst_structure_get_value(gst_message_get_structure(msg), value_name);
 #if GST_CHECK_VERSION(1,0,0)
+G_GNUC_BEGIN_IGNORE_DEPRECATIONS
 	value = g_value_array_get_nth(g_value_get_boxed(list), 0);
+G_GNUC_END_IGNORE_DEPRECATIONS
 #else
 	value = gst_value_list_get_value(list, 0);
 #endif



More information about the Commits mailing list