[glib] Move setting the refcount to the end of the function
- From: Alexander Larsson <alexl src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [glib] Move setting the refcount to the end of the function
- Date: Mon, 30 Nov 2009 20:03:17 +0000 (UTC)
commit 170423f924950728cec21a784787aa43b0be71bc
Author: Edward Hervey <bilboed bilboed com>
Date: Thu Sep 24 10:44:17 2009 +0200
Move setting the refcount to the end of the function
This is a safety feature for when making it atomic later.
https://bugzilla.gnome.org/show_bug.cgi?id=585375
gobject/gtype.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/gobject/gtype.c b/gobject/gtype.c
index cd33770..07ed622 100644
--- a/gobject/gtype.c
+++ b/gobject/gtype.c
@@ -1127,7 +1127,6 @@ type_data_make_W (TypeNode *node,
}
node->data = data;
- node->ref_count = 1;
if (vtable_size)
{
@@ -1158,6 +1157,8 @@ type_data_make_W (TypeNode *node,
GPOINTER_TO_UINT (type_get_qdata_L (node, static_quark_type_flags))));
g_assert (node->data->common.value_table != NULL); /* paranoid */
+
+ node->ref_count = 1;
}
static inline void
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]