From f39a49b03610a1cd54b9feb18528f5c74539d5c9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Torsten=20Sch=C3=B6nfeld?= Date: Mon, 26 Apr 2010 23:38:41 +0200 Subject: [PATCH] gio: Add a boxed type for GFileAttributeMatcher https://bugzilla.gnome.org/show_bug.cgi?id=616892 --- docs/reference/gio/gio.types | 1 + gio/gfileinfo.c | 18 ++++++++++++++++++ gio/gfileinfo.h | 1 + gio/gio.symbols | 1 + 4 files changed, 21 insertions(+) diff --git a/docs/reference/gio/gio.types b/docs/reference/gio/gio.types index 34674c87e..e8f973822 100644 --- a/docs/reference/gio/gio.types +++ b/docs/reference/gio/gio.types @@ -24,6 +24,7 @@ g_emblem_get_type g_emblem_origin_get_type g_emblemed_icon_get_type g_file_attribute_info_flags_get_type +g_file_attribute_matcher_get_type g_file_attribute_status_get_type g_file_attribute_type_get_type g_file_copy_flags_get_type diff --git a/gio/gfileinfo.c b/gio/gfileinfo.c index 23cc888ac..b9722a335 100644 --- a/gio/gfileinfo.c +++ b/gio/gfileinfo.c @@ -2148,6 +2148,24 @@ 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_file_attribute_matcher_new: * @attributes: an attribute string to match. diff --git a/gio/gfileinfo.h b/gio/gfileinfo.h index 2b5110f1e..90188eba0 100644 --- a/gio/gfileinfo.h +++ b/gio/gfileinfo.h @@ -935,6 +935,7 @@ void g_file_info_set_symlink_target (GFileInfo *info, void g_file_info_set_sort_order (GFileInfo *info, gint32 sort_order); +GType g_file_attribute_matcher_get_type (void) G_GNUC_CONST; GFileAttributeMatcher *g_file_attribute_matcher_new (const char *attributes); GFileAttributeMatcher *g_file_attribute_matcher_ref (GFileAttributeMatcher *matcher); void g_file_attribute_matcher_unref (GFileAttributeMatcher *matcher); diff --git a/gio/gio.symbols b/gio/gio.symbols index aa2eadf7e..8c278fa77 100644 --- a/gio/gio.symbols +++ b/gio/gio.symbols @@ -485,6 +485,7 @@ g_file_info_set_size g_file_info_set_modification_time g_file_info_set_symlink_target g_file_info_set_sort_order +g_file_attribute_matcher_get_type G_GNUC_CONST g_file_attribute_matcher_new g_file_attribute_matcher_ref g_file_attribute_matcher_unref