diff --git a/glib/gquark.c b/glib/gquark.c index c4d12b870..cfe4ab878 100644 --- a/glib/gquark.c +++ b/glib/gquark.c @@ -126,6 +126,9 @@ g_quark_init (void) * If you want the GQuark to be created if it doesn't already exist, * use g_quark_from_string() or g_quark_from_static_string(). * + * This function must not be used before library constructors have finished + * running. + * * Returns: the #GQuark associated with the string, or 0 if @string is * %NULL or there is no #GQuark associated with it */ @@ -214,6 +217,10 @@ quark_from_string_locked (const gchar *string, * not currently have an associated #GQuark, a new #GQuark is created, * using a copy of the string. * + * This function must not be used before library constructors have finished + * running. In particular, this means it cannot be used to initialize global + * variables in C++. + * * Returns: the #GQuark identifying the string, or 0 if @string is %NULL */ GQuark @@ -239,6 +246,10 @@ g_quark_from_string (const gchar *string) * expect to ever unload the module again (e.g. do not use this * function in GTK+ theme engines). * + * This function must not be used before library constructors have finished + * running. In particular, this means it cannot be used to initialize global + * variables in C++. + * * Returns: the #GQuark identifying the string, or 0 if @string is %NULL */ GQuark @@ -325,6 +336,10 @@ quark_intern_string_locked (const gchar *string, * can be compared for equality by comparing the pointers, instead of * using strcmp(). * + * This function must not be used before library constructors have finished + * running. In particular, this means it cannot be used to initialize global + * variables in C++. + * * Returns: a canonical representation for the string * * Since: 2.10 @@ -344,6 +359,10 @@ g_intern_string (const gchar *string) * using strcmp(). g_intern_static_string() does not copy the string, * therefore @string must not be freed or modified. * + * This function must not be used before library constructors have finished + * running. In particular, this means it cannot be used to initialize global + * variables in C++. + * * Returns: a canonical representation for the string * * Since: 2.10