[anjuta] jhbuild: Provide a fallback for G_DEFINE_QUARK to allow	compilation with GLib 2.32
- From: Sebastien Granjoux <sgranjoux src gnome org>
- To: commits-list gnome org
- Cc: 
- Subject: [anjuta] jhbuild: Provide a fallback for G_DEFINE_QUARK to allow	compilation with GLib 2.32
- Date: Sat, 27 Oct 2012 16:02:05 +0000 (UTC)
commit eca2381818a51f4295faa6baea55df2f4c7863c8
Author: SÃbastien Granjoux <seb sfo free fr>
Date:   Sat Oct 27 18:00:54 2012 +0200
    jhbuild: Provide a fallback for G_DEFINE_QUARK to allow compilation with GLib 2.32
 plugins/jhbuild/plugin.c |   10 ++++++++++
 1 files changed, 10 insertions(+), 0 deletions(-)
---
diff --git a/plugins/jhbuild/plugin.c b/plugins/jhbuild/plugin.c
index 154ea85..0be9ccf 100644
--- a/plugins/jhbuild/plugin.c
+++ b/plugins/jhbuild/plugin.c
@@ -35,6 +35,16 @@ struct _JHBuildPluginClass
 #define JHBUILD_PLUGIN_ERROR (jhbuild_plugin_error_quark())
 static GQuark jhbuild_plugin_error_quark(void);
 
+/* G_DEFINE_QUARK is defined in GLib 2.34 provide a fallback for Glib 2.32 */
+#ifndef G_DEFINE_QUARK
+#define G_DEFINE_QUARK(QN, q_n)                      \
+GQuark                                               \
+q_n##_quark (void)                                   \
+{                                                    \
+      return g_quark_from_string (#QN);              \
+}
+#endif
+
 G_DEFINE_QUARK(JHBUILD_PLUGIN_ERROR, jhbuild_plugin_error);
 
 static char *
[
Date Prev][
Date Next]   [
Thread Prev][
Thread Next]   
[
Thread Index]
[
Date Index]
[
Author Index]