From b383c8f08f119fbc418898b7665c7ca52e153e1a Mon Sep 17 00:00:00 2001 From: Colin Walters Date: Mon, 6 Oct 2008 21:59:29 +0000 Subject: [PATCH] Bug 554745 - GFileAttributeInfoList should be boxed 2008-10-06 Colin Walters Bug 554745 - GFileAttributeInfoList should be boxed * gio/gfileattribute.c: Define a boxed type for GFileAttributeList for convenience of bindings. * gio/gfileattribute.h: Prototype it. svn path=/trunk/; revision=7573 --- gio/ChangeLog | 8 ++++++++ gio/gfileattribute.c | 12 ++++++++++++ gio/gfileattribute.h | 1 + 3 files changed, 21 insertions(+) diff --git a/gio/ChangeLog b/gio/ChangeLog index 192637a..9571c8f 100644 --- a/gio/ChangeLog +++ b/gio/ChangeLog @@ -1,3 +1,11 @@ +2008-10-06 Colin Walters + + Bug 554745 - GFileAttributeInfoList should be boxed + + * gio/gfileattribute.c: Define a boxed type for GFileAttributeList + for convenience of bindings. + * gio/gfileattribute.h: Prototype it. + 2008-10-05 Pascal Terjan Bug 554970 – segfault when update-desktop-database is not available diff --git a/gio/gfileattribute.c b/gio/gfileattribute.c index d732200..bea20da 100644 --- a/gio/gfileattribute.c +++ b/gio/gfileattribute.c @@ -326,6 +326,18 @@ _g_file_attribute_value_dup (const GFileAttributeValue *other) return attr; } +GType +g_file_attribute_info_list_get_type (void) +{ + static GType type_id = 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; +} + static gboolean valid_char (char c) { diff --git a/gio/gfileattribute.h b/gio/gfileattribute.h index 9c44cd9..46803fb 100644 --- a/gio/gfileattribute.h +++ b/gio/gfileattribute.h @@ -60,6 +60,7 @@ struct _GFileAttributeInfoList int n_infos; }; +GType g_file_attribute_info_list_get_type (void); GFileAttributeInfoList * g_file_attribute_info_list_new (void); GFileAttributeInfoList * g_file_attribute_info_list_ref (GFileAttributeInfoList *list); void g_file_attribute_info_list_unref (GFileAttributeInfoList *list); -- 2.7.4