mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-08-22 00:48:53 +02:00
applied patch from Jean-Yves Lefort <jylefort@brutele.be> to not access
Wed Oct 6 02:12:44 2004 <timj@birnet.org> * gtype.c (g_type_instance_get_private): applied patch from Jean-Yves Lefort <jylefort@brutele.be> to not access the instance_real_class_bsa pointer without holding the instance_real_class lock.
This commit is contained in:
@@ -1,3 +1,9 @@
|
|||||||
|
Wed Oct 6 02:12:44 2004 <timj@birnet.org>
|
||||||
|
|
||||||
|
* gtype.c (g_type_instance_get_private): applied patch from Jean-Yves
|
||||||
|
Lefort <jylefort@brutele.be> to not access the instance_real_class_bsa
|
||||||
|
pointer without holding the instance_real_class lock.
|
||||||
|
|
||||||
2004-10-04 Matthias Clasen <mclasen@redhat.com>
|
2004-10-04 Matthias Clasen <mclasen@redhat.com>
|
||||||
|
|
||||||
* gsignal.c (g_signal_add_emission_hook): Improve the warning
|
* gsignal.c (g_signal_add_emission_hook): Improve the warning
|
||||||
|
@@ -1515,7 +1515,7 @@ instance_real_class_get (gpointer instance)
|
|||||||
InstanceRealClass key, *node;
|
InstanceRealClass key, *node;
|
||||||
key.instance = instance;
|
key.instance = instance;
|
||||||
G_LOCK (instance_real_class);
|
G_LOCK (instance_real_class);
|
||||||
node = g_bsearch_array_lookup (instance_real_class_bsa, &instance_real_class_bconfig, &key);
|
node = instance_real_class_bsa ? g_bsearch_array_lookup (instance_real_class_bsa, &instance_real_class_bconfig, &key) : NULL;
|
||||||
G_UNLOCK (instance_real_class);
|
G_UNLOCK (instance_real_class);
|
||||||
return node ? node->class : NULL;
|
return node ? node->class : NULL;
|
||||||
}
|
}
|
||||||
@@ -3535,13 +3535,8 @@ g_type_instance_get_private (GTypeInstance *instance,
|
|||||||
/* while instances are initialized, their class pointers change,
|
/* while instances are initialized, their class pointers change,
|
||||||
* so figure the instances real class first
|
* so figure the instances real class first
|
||||||
*/
|
*/
|
||||||
if (instance_real_class_bsa)
|
class = instance_real_class_get (instance);
|
||||||
{
|
if (!class)
|
||||||
class = instance_real_class_get (instance);
|
|
||||||
if (!class)
|
|
||||||
class = instance->g_class;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
class = instance->g_class;
|
class = instance->g_class;
|
||||||
|
|
||||||
instance_node = lookup_type_node_I (class->g_type);
|
instance_node = lookup_type_node_I (class->g_type);
|
||||||
|
Reference in New Issue
Block a user