mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-08-21 08:28:53 +02:00
Search provided include dirs before the default directories.
2008-11-11 Owen Taylor <otaylor@redhat.com> * girepository/girparser.c: Search provided include dirs before the default directories. svn path=/trunk/; revision=885
This commit is contained in:
16
girparser.c
16
girparser.c
@@ -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);
|
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)
|
if (extra_paths != NULL)
|
||||||
{
|
{
|
||||||
for (dir = extra_paths; *dir; dir++)
|
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;
|
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);
|
g_free (girname);
|
||||||
return path;
|
return path;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user