[gobject-introspection] girepository: Call init_globals()



commit 4a01ca43c976ba09c1647cbc56918f3b3e917ff4
Author: Colin Walters <walters verbum org>
Date:   Thu Sep 2 17:40:54 2010 -0400

    girepository: Call init_globals()
    
    This fixes the search path initialization if g_irepository_require
    is called first thing.

 girepository/girepository.c |   24 +++++++++++++-----------
 1 files changed, 13 insertions(+), 11 deletions(-)
---
diff --git a/girepository/girepository.c b/girepository/girepository.c
index db4fdc9..a8c661a 100644
--- a/girepository/girepository.c
+++ b/girepository/girepository.c
@@ -168,19 +168,21 @@ g_irepository_get_search_path (void)
   return search_path;
 }
 
-static
-GSList *
+static GSList *
 build_search_path_with_overrides (void)
 {
-	GSList *result;
-	if (override_search_path != NULL)
-	  {
-		result = g_slist_copy (override_search_path);
-		g_slist_last (result)->next = g_slist_copy (search_path);
-	  }
-	else
-	  result = g_slist_copy (search_path);
-	return result;
+  GSList *result;
+
+  init_globals ();
+
+  if (override_search_path != NULL)
+    {
+      result = g_slist_copy (override_search_path);
+      g_slist_last (result)->next = g_slist_copy (search_path);
+    }
+  else
+    result = g_slist_copy (search_path);
+  return result;
 }
 
 static char *



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]