[gobject-introspection] Box GIBaseInfo structure.
- From: Johan Dahlin <johan src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gobject-introspection] Box GIBaseInfo structure.
- Date: Wed, 15 Sep 2010 12:50:08 +0000 (UTC)
commit 34d35c5aa0827832fac3b3cc07643a96d3547c88
Author: Pavel Holejsovsky <pavel holejsovsky gmail com>
Date: Fri Sep 3 15:20:43 2010 +0200
Box GIBaseInfo structure.
This puts it into typelibs and allows to use it safely from scripts.
https://bugzilla.gnome.org/show_bug.cgi?id=628753
girepository/gibaseinfo.c | 15 +++++++++++++++
girepository/gibaseinfo.h | 3 +++
2 files changed, 18 insertions(+), 0 deletions(-)
---
diff --git a/girepository/gibaseinfo.c b/girepository/gibaseinfo.c
index 07d0501..057cde7 100644
--- a/girepository/gibaseinfo.c
+++ b/girepository/gibaseinfo.c
@@ -30,6 +30,21 @@
#define INVALID_REFCOUNT 0x7FFFFFFF
+/* GBoxed registration of BaseInfo. */
+GType
+g_base_info_gtype_get_type (void)
+{
+ static GType our_type = 0;
+
+ if (our_type == 0)
+ our_type =
+ g_boxed_type_register_static ("GIBaseInfo",
+ (GBoxedCopyFunc) g_base_info_ref,
+ (GBoxedFreeFunc) g_base_info_unref);
+
+ return our_type;
+}
+
/* info creation */
GIBaseInfo *
_g_info_new_full (GIInfoType type,
diff --git a/girepository/gibaseinfo.h b/girepository/gibaseinfo.h
index 106aadf..7bb1cab 100644
--- a/girepository/gibaseinfo.h
+++ b/girepository/gibaseinfo.h
@@ -58,6 +58,9 @@ typedef struct {
gpointer data4;
} GIAttributeIter;
+#define GI_TYPE_BASE_INFO (g_base_info_gtype_get_type ())
+
+GType g_base_info_gtype_get_type (void) G_GNUC_CONST;
GIBaseInfo * g_base_info_ref (GIBaseInfo *info);
void g_base_info_unref (GIBaseInfo *info);
GIInfoType g_base_info_get_type (GIBaseInfo *info);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]