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:
@@ -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
|
static inline gboolean
|
||||||
nm_g_hash_table_replace (GHashTable *hash, gpointer key, gpointer value)
|
nm_g_hash_table_replace (GHashTable *hash, gpointer key, gpointer value)
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user