summaryrefslogtreecommitdiff
path: root/girepository/girwriter.c
diff options
context:
space:
mode:
authorPhilip Withnall <philip@tecnocode.co.uk>2015-01-31 22:48:56 +0000
committerPhilip Withnall <philip.withnall@collabora.co.uk>2015-02-16 08:49:28 +0000
commit8480bf5f108f72585016254c79d9c495e1b0a4a7 (patch)
tree2578ac864bad36ff27720fd1b931ee7776521349 /girepository/girwriter.c
parent6ff0b08ff1982ef60d077ba5e1c11ea605be606b (diff)
downloadgobject-introspection-8480bf5f108f72585016254c79d9c495e1b0a4a7.tar.gz
girepository: Add g_irepository_get_immediate_dependencies()
g_irepository_get_dependencies() is supposed to return the transitive closure of all dependencies of the given namespace. However, it just loads the dependencies field from the typelib, which is supposed to only list immediate dependencies. Introduce a new g_irepository_get_immediate_dependencies() which does this, and rewrite g_irepository_get_dependencies() to build the transitive closure of all its namespace dependencies. This does not require loading any new typelibs, as the transitive closure of dependencies should already have been loaded by g_irepository_require() or g_irepository_load_typelib(). https://bugzilla.gnome.org/show_bug.cgi?id=743782
Diffstat (limited to 'girepository/girwriter.c')
-rw-r--r--girepository/girwriter.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/girepository/girwriter.c b/girepository/girwriter.c
index 5b39e2de..01f5f506 100644
--- a/girepository/girwriter.c
+++ b/girepository/girwriter.c
@@ -1307,8 +1307,8 @@ gir_writer_write (const char *filename,
" xmlns:c=\"http://www.gtk.org/introspection/c/1.0\"\n"
" xmlns:glib=\"http://www.gtk.org/introspection/glib/1.0\"");
- dependencies = g_irepository_get_dependencies (repository,
- namespace);
+ dependencies = g_irepository_get_immediate_dependencies (repository,
+ namespace);
if (dependencies != NULL)
{
for (i = 0; dependencies[i]; i++)