Use G_DEFINE_[BOXED|POINTER]_TYPE instead of handwritten code

Now that we have convenience macros to implement boxed and pointer
types, use them.
This commit is contained in:
Christian Persch
2008-05-24 16:08:28 +02:00
parent dc1999316d
commit 71e73ffdfb
7 changed files with 51 additions and 264 deletions

View File

@@ -336,23 +336,9 @@ _g_file_attribute_value_dup (const GFileAttributeValue *other)
return attr;
}
GType
g_file_attribute_info_list_get_type (void)
{
static volatile gsize g_define_type_id__volatile = 0;
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;
}
G_DEFINE_BOXED_TYPE (GFileAttributeInfoList, g_file_attribute_info_list,
g_file_attribute_info_list_dup,
g_file_attribute_info_list_unref)
static gboolean
valid_char (char c)