From: Edward Hervey Date: Thu, 24 Sep 2009 08:44:17 +0000 (+0200) Subject: Move setting the refcount to the end of the function X-Git-Tag: 2.23.1~38 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=170423f924950728cec21a784787aa43b0be71bc;p=platform%2Fupstream%2Fglib.git 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 --- 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