mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager
synced 2024-10-15 12:34:55 +00:00
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:
parent
cd31437024
commit
829f8e8314
|
@ -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)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue