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.
This commit is contained in:
Thomas Haller 2020-02-13 15:21:34 +01:00
parent cd31437024
commit 829f8e8314

View file

@ -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)
{