[gcompris] rsvg: fixed deprecated issue releated to rsvg.
- From: Bruno Coudoin <bcoudoin src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gcompris] rsvg: fixed deprecated issue releated to rsvg.
- Date: Mon, 12 Dec 2011 22:25:11 +0000 (UTC)
commit f33de1c98e993a43cfb6ca4d664edad55f1f9c5f
Author: Hans de Goede <hdegoede redhat com>
Date: Mon Dec 12 23:23:42 2011 +0100
rsvg: fixed deprecated issue releated to rsvg.
src/boards/py-mod-utils.c | 6 ++++++
src/gcompris/gcompris.c | 4 ++++
2 files changed, 10 insertions(+), 0 deletions(-)
---
diff --git a/src/boards/py-mod-utils.c b/src/boards/py-mod-utils.c
index 5cb32e3..529cb79 100644
--- a/src/boards/py-mod-utils.c
+++ b/src/boards/py-mod-utils.c
@@ -72,7 +72,13 @@ py_gc_svg_load(PyObject* self, PyObject* args)
/* Create and return the result */
pyresult = (PyObject*) pygobject_new((GObject*) result);
+/* rsvg.h only marks these deprecated with glib >= 2.31.0, and rsvg.h has no
+ version define itself */
+#if GLIB_CHECK_VERSION (2, 31, 0)
+ g_object_unref(result);
+#else
rsvg_handle_free(result);
+#endif
return(pyresult);
diff --git a/src/gcompris/gcompris.c b/src/gcompris/gcompris.c
index 7ab33d6..368a51d 100644
--- a/src/gcompris/gcompris.c
+++ b/src/gcompris/gcompris.c
@@ -2036,7 +2036,11 @@ main (int argc, char *argv[])
/* Gdk-Pixbuf */
gdk_rgb_init();
+/* rsvg.h only marks these deprecated with glib >= 2.31.0, and rsvg.h has no
+ version define itself */
+#if !GLIB_CHECK_VERSION (2, 31, 0)
rsvg_init();
+#endif
setup_window ();
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]