mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-02-09 04:15:49 +01:00
G_DEFINE_QUARK: fix up some implementation issues
https://bugzilla.gnome.org/show_bug.cgi?id=683360
This commit is contained in:
parent
986405c37a
commit
73a100d2ef
@ -48,13 +48,12 @@ const gchar * g_quark_to_string (GQuark quark) G_GNUC_CON
|
|||||||
GQuark \
|
GQuark \
|
||||||
q_n##_quark (void) \
|
q_n##_quark (void) \
|
||||||
{ \
|
{ \
|
||||||
static volatile gsize g_define_quark__volatile = 0; \
|
static GQuark q; \
|
||||||
if (g_once_init_enter (&g_define_quark__volatile)) \
|
\
|
||||||
{ \
|
if G_UNLIKELY (q == 0) \
|
||||||
GQuark g_define_quark = g_quark_from_string (#QN); \
|
q = g_quark_from_static_string (#QN); \
|
||||||
g_once_init_leave (&g_define_quark__volatile, g_define_quark); \
|
\
|
||||||
} \
|
return q; \
|
||||||
return g_define_quark__volatile; \
|
|
||||||
}
|
}
|
||||||
|
|
||||||
const gchar * g_intern_string (const gchar *string);
|
const gchar * g_intern_string (const gchar *string);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user