Bug 555313 – GFileAttribute boxed type get_type function should use

usual get_type pattern

svn path=/trunk/; revision=7580
This commit is contained in:
Christian Persch 2008-10-08 20:54:39 +00:00
parent c973369e31
commit 5d31f41df4
2 changed files with 20 additions and 6 deletions

View File

@ -1,3 +1,11 @@
2008-10-08 Christian Persch <chpe@gnome.org>
Bug 555313 GFileAttribute boxed type get_type function should
use usual get_type pattern
* gio/gfileattribute.c (g_file_attribute_info_list_get_type): Use
g_once_init_enter/leave.
2008-10-08 Christian Persch <chpe@gnome.org>
Bug 555314 mem leak in gmarkup

View File

@ -329,13 +329,19 @@ _g_file_attribute_value_dup (const GFileAttributeValue *other)
GType
g_file_attribute_info_list_get_type (void)
{
static GType type_id = 0;
static volatile gsize g_define_type_id__volatile = 0;
if (!type_id)
type_id = g_boxed_type_register_static (g_intern_static_string ("GFileAttributeInfoList"),
(GBoxedCopyFunc) g_file_attribute_info_list_dup,
(GBoxedFreeFunc) g_file_attribute_info_list_unref);
return type_id;
if (g_once_init_enter (&g_define_type_id__volatile))
{
GType g_define_type_id =
g_boxed_type_register_static (I_("GFileAttributeInfoList"),
(GBoxedCopyFunc) g_file_attribute_info_list_dup,
(GBoxedFreeFunc) g_file_attribute_info_list_unref);
g_once_init_leave (&g_define_type_id__volatile, g_define_type_id);
}
return g_define_type_id__volatile;
}
static gboolean