summaryrefslogtreecommitdiff
path: root/girepository/giversionmacros.h
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/giversionmacros.h
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/giversionmacros.h')
-rw-r--r--girepository/giversionmacros.h16
1 files changed, 15 insertions, 1 deletions
diff --git a/girepository/giversionmacros.h b/girepository/giversionmacros.h
index 15c88476..3c2faf47 100644
--- a/girepository/giversionmacros.h
+++ b/girepository/giversionmacros.h
@@ -125,4 +125,18 @@
# define GI_AVAILABLE_IN_1_42 _GI_EXTERN
#endif
-#endif /* __GIVERSIONMACROS_H__ */ \ No newline at end of file
+#if GLIB_VERSION_MIN_REQUIRED >= GLIB_VERSION_2_44
+# define GI_DEPRECATED_IN_1_44 GLIB_DEPRECATED
+# define GI_DEPRECATED_IN_1_44_FOR(f) GLIB_DEPRECATED_FOR(f)
+#else
+# define GI_DEPRECATED_IN_1_44 _GI_EXTERN
+# define GI_DEPRECATED_IN_1_44_FOR(f) _GI_EXTERN
+#endif
+
+#if GLIB_VERSION_MAX_ALLOWED < GLIB_VERSION_2_44
+# define GI_AVAILABLE_IN_1_44 GLIB_UNAVAILABLE(2, 44)
+#else
+# define GI_AVAILABLE_IN_1_44 _GI_EXTERN
+#endif
+
+#endif /* __GIVERSIONMACROS_H__ */