Search provided include dirs before the default directories.
authorOwen Taylor <otaylor@redhat.com>
Tue, 11 Nov 2008 15:25:59 +0000 (15:25 +0000)
committerOwen Taylor <otaylor@src.gnome.org>
Tue, 11 Nov 2008 15:25:59 +0000 (15:25 +0000)
2008-11-11  Owen Taylor  <otaylor@redhat.com>

        * girepository/girparser.c: Search provided include dirs before
        the default directories.

svn path=/trunk/; revision=885

ChangeLog
girepository/girparser.c

index 1f396b4..a12e011 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2008-11-11  Owen Taylor  <otaylor@redhat.com>
+
+       * girepository/girparser.c: Search provided include dirs before
+       the default directories.
+
 2008-11-11  Owen Taylor  <otaylor@redhat.com>
 
        * girepository/giroffsets.c: Include fully-qualified names in
index af9bf34..74d7275 100644 (file)
@@ -198,14 +198,6 @@ locate_gir (const char *name, const char *version, const char * const* extra_pat
       
   girname = g_strdup_printf ("%s-%s.gir", name, version);
   
-  for (dir = datadirs; *dir; dir++) 
-    {
-      path = g_build_filename (*dir, "gir", girname, NULL);
-      if (g_file_test (path, G_FILE_TEST_EXISTS | G_FILE_TEST_IS_REGULAR))
-       return path;
-      g_free (path);
-      path = NULL;
-    }
   if (extra_paths != NULL)
     {
       for (dir = extra_paths; *dir; dir++) 
@@ -217,6 +209,14 @@ locate_gir (const char *name, const char *version, const char * const* extra_pat
          path = NULL;
        }
     }
+  for (dir = datadirs; *dir; dir++) 
+    {
+      path = g_build_filename (*dir, "gir", girname, NULL);
+      if (g_file_test (path, G_FILE_TEST_EXISTS | G_FILE_TEST_IS_REGULAR))
+       return path;
+      g_free (path);
+      path = NULL;
+    }
   g_free (girname);
   return path;
 }