gobject-introspection r545 - trunk/girepository
- From: walters svn gnome org
- To: svn-commits-list gnome org
- Subject: gobject-introspection r545 - trunk/girepository
- Date: Sat, 30 Aug 2008 20:31:16 +0000 (UTC)
Author: walters
Date: Sat Aug 30 20:31:16 2008
New Revision: 545
URL: http://svn.gnome.org/viewvc/gobject-introspection?rev=545&view=rev
Log:
Add back unresolved
Modified:
trunk/girepository/ginfo.c
trunk/girepository/girepository.h
Modified: trunk/girepository/ginfo.c
==============================================================================
--- trunk/girepository/ginfo.c (original)
+++ trunk/girepository/ginfo.c Sat Aug 30 20:31:16 2008
@@ -174,12 +174,17 @@
result = g_irepository_find_by_name (repository, namespace, name);
if (result == NULL)
{
- char **all_namespaces = g_irepository_get_namespaces (repository);
- char *namespaces_str = g_strjoinv (", ", all_namespaces);
- g_critical ("Failed to find namespace: %s name: %s (currently loaded namespaces: %s)", namespace,
- name, namespaces_str);
- g_strfreev (all_namespaces);
- g_free (namespaces_str);
+ GIUnresolvedInfo *unresolved;
+
+ unresolved = g_new0 (GIUnresolvedInfo, 1);
+
+ unresolved->type = GI_INFO_TYPE_UNRESOLVED;
+ unresolved->ref_count = 1;
+ unresolved->container = NULL;
+ unresolved->name = name;
+ unresolved->namespace = namespace;
+
+ return (GIBaseInfo*)unresolved;
}
return result;
}
@@ -289,7 +294,13 @@
return g_typelib_get_string (info->typelib, blob->name);
}
break;
+ case GI_INFO_TYPE_UNRESOLVED:
+ {
+ GIUnresolvedInfo *unresolved = (GIUnresolvedInfo *)info;
+ return unresolved->name;
+ }
+ break;
case GI_INFO_TYPE_TYPE:
default: ;
g_assert_not_reached ();
@@ -306,6 +317,13 @@
g_assert (info->ref_count > 0);
+ if (info->type == GI_INFO_TYPE_UNRESOLVED)
+ {
+ GIUnresolvedInfo *unresolved = (GIUnresolvedInfo *)info;
+
+ return unresolved->namespace;
+ }
+
return g_typelib_get_string (info->typelib, header->namespace);
}
Modified: trunk/girepository/girepository.h
==============================================================================
--- trunk/girepository/girepository.h (original)
+++ trunk/girepository/girepository.h Sat Aug 30 20:31:16 2008
@@ -150,7 +150,8 @@
GI_INFO_TYPE_PROPERTY,
GI_INFO_TYPE_FIELD,
GI_INFO_TYPE_ARG,
- GI_INFO_TYPE_TYPE
+ GI_INFO_TYPE_TYPE,
+ GI_INFO_TYPE_UNRESOLVED
} GIInfoType;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]