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
This commit is contained in:
Pavel Holejsovsky 2010-09-03 15:20:43 +02:00 committed by Johan Dahlin
parent 6bc078f1ee
commit c664ffed5f
2 changed files with 18 additions and 0 deletions

View File

@ -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,

View File

@ -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);