Rework how fundamental GObject types are introspected

Change the special code for handling GObject and GInitiallyUnowned
so that it exposes GParamSpec as a class, and it allows GVariant to
have a GType without using the deprecate g_variant_get_gtype.

It is a sort of ABI break, in that new typelibs won't work with
previous versions of libgirepository.

https://bugzilla.gnome.org/show_bug.cgi?id=646635
This commit is contained in:
Giovanni Campagna 2011-05-25 19:26:49 +02:00
parent fef2a7b8dd
commit a1b527c79f
2 changed files with 4 additions and 2 deletions

View File

@ -177,7 +177,7 @@ dump_object_type (GType type, const char *symbol, GOutputStream *out)
parent = g_type_parent (type); parent = g_type_parent (type);
parent_str = g_string_new (""); parent_str = g_string_new ("");
while (parent != G_TYPE_OBJECT && parent != G_TYPE_INVALID) while (parent != G_TYPE_INVALID)
{ {
if (first) if (first)
first = FALSE; first = FALSE;

View File

@ -136,7 +136,9 @@ g_registered_type_info_get_g_type (GIRegisteredTypeInfo *info)
if (type_init == NULL) if (type_init == NULL)
return G_TYPE_NONE; return G_TYPE_NONE;
else if (!strcmp (type_init, "intern")) else if (!strcmp (type_init, "intern"))
return G_TYPE_OBJECT; /* The special string "intern" is used for some types exposed by libgobject
(that therefore should be always available) */
return g_type_from_name (g_registered_type_info_get_type_name (info));
get_type_func = NULL; get_type_func = NULL;
if (!g_typelib_symbol (rinfo->typelib, if (!g_typelib_symbol (rinfo->typelib,