mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-02-25 19:52:10 +01:00
girparser: Make ownership transfers out of locate_gir() more obvious
Signed-off-by: Simon McVittie <smcv@debian.org>
This commit is contained in:
parent
79e1bc5bef
commit
9d8bcc9817
@ -303,7 +303,7 @@ locate_gir (GIrParser *parser,
|
||||
path = g_build_filename (*dir, girname, NULL);
|
||||
g_debug ("Trying %s from includes", path);
|
||||
if (g_file_test (path, G_FILE_TEST_EXISTS | G_FILE_TEST_IS_REGULAR))
|
||||
return path;
|
||||
return g_steal_pointer (&path);
|
||||
g_free (path);
|
||||
path = NULL;
|
||||
}
|
||||
@ -313,7 +313,7 @@ locate_gir (GIrParser *parser,
|
||||
path = g_build_filename (*dir, GIR_SUFFIX, girname, NULL);
|
||||
g_debug ("Trying %s from system data dirs", path);
|
||||
if (g_file_test (path, G_FILE_TEST_EXISTS | G_FILE_TEST_IS_REGULAR))
|
||||
return path;
|
||||
return g_steal_pointer (&path);
|
||||
g_free (path);
|
||||
path = NULL;
|
||||
}
|
||||
@ -321,7 +321,7 @@ locate_gir (GIrParser *parser,
|
||||
path = g_build_filename (GIR_DIR, girname, NULL);
|
||||
g_debug ("Trying %s from GIR_DIR", path);
|
||||
if (g_file_test (path, G_FILE_TEST_EXISTS | G_FILE_TEST_IS_REGULAR))
|
||||
return path;
|
||||
return g_steal_pointer (&path);
|
||||
g_free (path);
|
||||
|
||||
g_debug ("Did not find %s", girname);
|
||||
|
Loading…
x
Reference in New Issue
Block a user