glib r7580 - in trunk: . gio
- From: chpe svn gnome org
- To: svn-commits-list gnome org
- Subject: glib r7580 - in trunk: . gio
- Date: Wed, 8 Oct 2008 20:54:39 +0000 (UTC)
Author: chpe
Date: Wed Oct 8 20:54:39 2008
New Revision: 7580
URL: http://svn.gnome.org/viewvc/glib?rev=7580&view=rev
Log:
Bug 555313 â GFileAttribute boxed type get_type function should use
usual get_type pattern
Modified:
trunk/ChangeLog
trunk/gio/gfileattribute.c
Modified: trunk/gio/gfileattribute.c
==============================================================================
--- trunk/gio/gfileattribute.c (original)
+++ trunk/gio/gfileattribute.c Wed Oct 8 20:54:39 2008
@@ -329,13 +329,19 @@
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
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]