From 846abed19765b65dad2b3a335b8768bb47884ccf Mon Sep 17 00:00:00 2001 From: Philip Withnall Date: Tue, 23 Jan 2024 23:42:10 +0000 Subject: [PATCH] girepository: Move a helper method This introduces no functional changes, but simplifies an upcoming commit. Signed-off-by: Philip Withnall --- girepository/girepository.c | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/girepository/girepository.c b/girepository/girepository.c index 9ecf6086b..2f48af4d4 100644 --- a/girepository/girepository.c +++ b/girepository/girepository.c @@ -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,