From d2c401d55a60891b9c4ed0bde1cc113653c78e82 Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Thu, 3 Feb 2005 05:45:21 +0000 Subject: [PATCH] Add a warning against using g_quark_from_static_string() in dynamically 2005-02-03 Matthias Clasen * glib/tmpl/quarks.sgml: Add a warning against using g_quark_from_static_string() in dynamically loaded modules. --- docs/reference/ChangeLog | 6 ++++++ docs/reference/glib/tmpl/quarks.sgml | 6 +++++- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/docs/reference/ChangeLog b/docs/reference/ChangeLog index 531a49c..b2820f8 100644 --- a/docs/reference/ChangeLog +++ b/docs/reference/ChangeLog @@ -1,3 +1,9 @@ +2005-02-03 Matthias Clasen + + * glib/tmpl/quarks.sgml: Add a warning against + using g_quark_from_static_string() in dynamically + loaded modules. + 2005-02-02 Matthias Clasen * glib/tmpl/misc_utils.sgml: diff --git a/docs/reference/glib/tmpl/quarks.sgml b/docs/reference/glib/tmpl/quarks.sgml index b62e032..9a531f3 100644 --- a/docs/reference/glib/tmpl/quarks.sgml +++ b/docs/reference/glib/tmpl/quarks.sgml @@ -58,7 +58,11 @@ If the string does not currently have an associated #GQuark, a new Note that this function is identical to g_quark_from_string() except that if a new #GQuark is created the string itself is used rather than a copy. This saves memory, but can only be used if the string will -always exist (if, for example, it is a statically-allocated string). +always exist. It can be used with statically +allocated strings in the main program, but not with statically +allocated memory in dynamically loaded modules, if you expect to +ever unload the module again (e.g. do not use this function in +GTK+ theme engines). @string: a string. -- 2.7.4