Add a g_irepository_get_search_path, so we can access the search paths
authorJohan Dahlin <jdahlin@async.com.br>
Wed, 12 Nov 2008 12:40:34 +0000 (12:40 +0000)
committerJohan Dahlin <johan@src.gnome.org>
Wed, 12 Nov 2008 12:40:34 +0000 (12:40 +0000)
2008-11-12  Johan Dahlin  <jdahlin@async.com.br>

        * girepository/girepository.c (g_irepository_get_search_path):
        * girepository/girepository.h:
        Add a g_irepository_get_search_path, so we can access the search
        paths from runtime.

svn path=/trunk/; revision=893

ChangeLog
girepository/girepository.c
girepository/girepository.h

index d96f47a..2f63b00 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2008-11-12  Johan Dahlin  <jdahlin@async.com.br>
+
+       * girepository/girepository.c (g_irepository_get_search_path):
+       * girepository/girepository.h:
+       Add a g_irepository_get_search_path, so we can access the search
+       paths from runtime.
+
 2008-11-12  Johan Bilien  <jobi@via.ecp.fr>
 
        Bug 560474 – g-ir-compiler crashes when compiling the glib gir
index dc9473a..392118d 100644 (file)
@@ -137,6 +137,21 @@ g_irepository_prepend_search_path (const char *directory)
   search_path = g_slist_prepend (search_path, g_strdup (directory));
 }
 
+/**
+ * g_irepository_get_search_path:
+ *
+ * Returns the search path the GIRepository will use when looking for typelibs.
+ * The string is internal to GIRespository and should not be freed, nor should
+ * the elements.
+ *
+ * Return value: (element-type utf8) (transfer none): list of strings
+ */
+GSList *
+g_irepository_get_search_path (void)
+{
+  return search_path;
+}
+
 static char *
 build_typelib_key (const char *name, const char *source)
 {
index c40b6b7..225c1f8 100644 (file)
@@ -77,6 +77,7 @@ typedef enum
 GType         g_irepository_get_type      (void) G_GNUC_CONST;
 GIRepository *g_irepository_get_default   (void);
 void          g_irepository_prepend_search_path (const char *directory);
+GSList *      g_irepository_get_search_path     (void);
 const char *  g_irepository_load_typelib  (GIRepository *repository,
                                           GTypelib     *typelib,
                                           GIRepositoryLoadFlags flags,