From b748da35d62eed88aa8b0f4d605e43033f2615a0 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Sebastian=20Dr=C3=B6ge?= Date: Fri, 23 Apr 2010 06:24:56 +0200 Subject: [PATCH] gst: Use GError boxed type from GObject 2.25.2 instead of our own if possible --- gst/gsterror.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/gst/gsterror.c b/gst/gsterror.c index cf9f7bf..ec99322 100644 --- a/gst/gsterror.c +++ b/gst/gsterror.c @@ -114,15 +114,20 @@ GQuark gst_ ## string ## _error_quark (void) { \ quark = g_quark_from_static_string ("gst-" # string "-error-quark"); \ return quark; } +/* FIXME: Deprecate when we depend on GLib 2.26 */ GType gst_g_error_get_type (void) { +#if GLIB_CHECK_VERSION(2,25,2) + return g_error_get_type (); +#else static GType type = 0; if (G_UNLIKELY (type == 0)) type = g_boxed_type_register_static ("GstGError", (GBoxedCopyFunc) g_error_copy, (GBoxedFreeFunc) g_error_free); return type; +#endif } #define FILE_A_BUG " Please file a bug at " PACKAGE_BUGREPORT "." -- 2.7.4