From 829f8e8314b7d3bc2c4ff3e8ed33b46880d0f187 Mon Sep 17 00:00:00 2001 From: Thomas Haller Date: Thu, 13 Feb 2020 15:21:34 +0100 Subject: [PATCH] shared: drop compat implementation for G_DEFINE_QUARK() For one, we by now require glib >= 2.34.0, so this is not used. Also, I think G_DEFINE_QUARK() is rather ugly because it constructs the defined function name (so you cannot grep for it). We should use NM_CACHED_QUARK_FCN() instead. --- shared/nm-glib-aux/nm-glib.h | 16 ---------------- 1 file changed, 16 deletions(-) diff --git a/shared/nm-glib-aux/nm-glib.h b/shared/nm-glib-aux/nm-glib.h index 93513a964f..e9d89ae0e3 100644 --- a/shared/nm-glib-aux/nm-glib.h +++ b/shared/nm-glib-aux/nm-glib.h @@ -193,22 +193,6 @@ __g_test_add_data_func_full (const char *testpath, /*****************************************************************************/ -#if !GLIB_CHECK_VERSION (2, 34, 0) -#define G_DEFINE_QUARK(QN, q_n) \ -GQuark \ -q_n##_quark (void) \ -{ \ - static GQuark q; \ - \ - if G_UNLIKELY (q == 0) \ - q = g_quark_from_static_string (#QN); \ - \ - return q; \ -} -#endif - -/*****************************************************************************/ - static inline gboolean nm_g_hash_table_replace (GHashTable *hash, gpointer key, gpointer value) {