girepository: Move a helper method

This introduces no functional changes, but simplifies an upcoming
commit.

Signed-off-by: Philip Withnall <pwithnall@gnome.org>
This commit is contained in:
Philip Withnall 2024-01-23 23:42:10 +00:00
parent b4063e1fa8
commit 846abed197

View File

@ -244,6 +244,17 @@ init_globals (void)
g_once_init_leave (&initialized, 1);
}
static GIRepository *
get_repository (GIRepository *repository)
{
init_globals ();
if (repository != NULL)
return repository;
else
return default_repository;
}
/**
* gi_repository_prepend_search_path:
* @directory: (type filename): directory name to prepend to the typelib
@ -321,17 +332,6 @@ get_typelib_dependencies (GITypelib *typelib)
return g_strsplit (dependencies_glob, "|", 0);
}
static GIRepository *
get_repository (GIRepository *repository)
{
init_globals ();
if (repository != NULL)
return repository;
else
return default_repository;
}
static GITypelib *
check_version_conflict (GITypelib *typelib,
const char *namespace,