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

@@ -2147,23 +2147,9 @@ matcher_add (GFileAttributeMatcher *matcher,
g_array_append_val (matcher->more_sub_matchers, s);
}
GType
g_file_attribute_matcher_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_("GFileAttributeMatcher"),
(GBoxedCopyFunc) g_file_attribute_matcher_ref,
(GBoxedFreeFunc) g_file_attribute_matcher_unref);
g_once_init_leave (&g_define_type_id__volatile, g_define_type_id);
}
return g_define_type_id__volatile;
}
G_DEFINE_BOXED_TYPE (GFileAttributeMatcher, g_file_attribute_matcher,
g_file_attribute_matcher_ref,
g_file_attribute_matcher_unref)
/**
* g_file_attribute_matcher_new: