diff options
author | Pavel Holejsovsky <pavel.holejsovsky@gmail.com> | 2010-09-03 15:20:43 +0200 |
---|---|---|
committer | Johan Dahlin <johan@gnome.org> | 2010-09-15 09:48:44 -0300 |
commit | 34d35c5aa0827832fac3b3cc07643a96d3547c88 (patch) | |
tree | 51d3ff70ebc230342ec3062d4b4a3be2f2a8f843 | |
parent | c31120dd00d2ea1513399832461ed4437c6940de (diff) | |
download | gobject-introspection-34d35c5aa0827832fac3b3cc07643a96d3547c88.tar.gz |
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.c | 15 | ||||
-rw-r--r-- | girepository/gibaseinfo.h | 3 |
2 files changed, 18 insertions, 0 deletions
diff --git a/girepository/gibaseinfo.c b/girepository/gibaseinfo.c index 07d05019..057cde72 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 106aadff..7bb1cab0 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); |