summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPavel Holejsovsky <pavel.holejsovsky@gmail.com>2010-09-03 15:20:43 +0200
committerJohan Dahlin <johan@gnome.org>2010-09-15 09:48:44 -0300
commit34d35c5aa0827832fac3b3cc07643a96d3547c88 (patch)
tree51d3ff70ebc230342ec3062d4b4a3be2f2a8f843
parentc31120dd00d2ea1513399832461ed4437c6940de (diff)
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
-rw-r--r--girepository/gibaseinfo.c15
-rw-r--r--girepository/gibaseinfo.h3
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);