[glib/wip/resources] Make GResource a boxed type
- From: Alexander Larsson <alexl src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glib/wip/resources] Make GResource a boxed type
- Date: Tue, 10 Jan 2012 15:48:53 +0000 (UTC)
commit 10411d72ba2297d87b168bfbf675665e562f38a2
Author: Alexander Larsson <alexl redhat com>
Date: Tue Jan 10 16:48:32 2012 +0100
Make GResource a boxed type
gio/gresource.c | 2 ++
gio/gresource.h | 9 +++++++++
2 files changed, 11 insertions(+), 0 deletions(-)
---
diff --git a/gio/gresource.c b/gio/gresource.c
index 1dfe741..bba118e 100644
--- a/gio/gresource.c
+++ b/gio/gresource.c
@@ -39,6 +39,8 @@ struct _GResource
GTypeModule *module;
};
+G_DEFINE_BOXED_TYPE (GResource, g_resouces, g_resource_ref, g_resource_unref)
+
/**
* SECTION:gresource
* @short_description: Resource framework
diff --git a/gio/gresource.h b/gio/gresource.h
index a9a7655..1717cc4 100644
--- a/gio/gresource.h
+++ b/gio/gresource.h
@@ -31,9 +31,18 @@
G_BEGIN_DECLS
+/**
+ * G_TYPE_RESOURCE:
+ *
+ * The #GType for #GResource.
+ */
+#define G_TYPE_RESOURCE (g_resource_get_type ())
+
+
#define G_RESOURCE_ERROR (g_resource_error_quark ())
GQuark g_resource_error_quark (void);
+GType g_resource_get_type (void) G_GNUC_CONST;
GResource * g_resource_new_from_data (GBytes *data,
GError **error);
GResource * g_resource_ref (GResource *resource);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]