Avoid double locking in g_intern_string (#322133, Benedikt Meurer)
authorMatthias Clasen <mclasen@redhat.com>
Tue, 22 Nov 2005 15:34:09 +0000 (15:34 +0000)
committerMatthias Clasen <matthiasc@src.gnome.org>
Tue, 22 Nov 2005 15:34:09 +0000 (15:34 +0000)
commit9ee3896017591b3fc4e85506b9979ebe6be9a049
treed46d655729a1bd4333253c9bd5422479966c8950
parent3e847a090cfd8495add631d43388c461b1a85716
Avoid double locking in g_intern_string (#322133, Benedikt Meurer)

2005-11-22  Matthias Clasen  <mclasen@redhat.com>

Avoid double locking in g_intern_string (#322133,
Benedikt Meurer)

* glib/gdataset.c (g_quark_from_string_internal): New
internal function which factors out common parts of
g_quark_from[_static]_string.
(g_quark_from_string, g_quark_from_static_string):
Use g_quark_from_string_internal.
(g_intern_string, g_intern_static_string): Use
g_quark_from_string_internal, and only take the
lock once.
(g_quark_new): Don't store the strings shifted by -1
in the g_quarks array.
(g_quark_to_string): Adapt to the previous change.
ChangeLog
ChangeLog.pre-2-10
ChangeLog.pre-2-12
glib/gdataset.c