mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-12-10 18:43:42 +01:00
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:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user