girwriter: Stop using the singleton GIRepository

It’s soon going to disappear.

Signed-off-by: Philip Withnall <pwithnall@gnome.org>

Helps: #3155
This commit is contained in:
Philip Withnall 2024-01-26 10:32:52 +00:00
parent 80f9153a7f
commit 9ab84bc14a

View File

@ -1335,10 +1335,10 @@ gi_ir_writer_write (const char *filename,
FILE *ofile;
size_t i, j;
char **dependencies;
GIRepository *repository;
GIRepository *repository = NULL;
Xml *xml;
repository = gi_repository_get_default ();
repository = gi_repository_new ();
if (filename == NULL)
ofile = stdout;
@ -1462,4 +1462,6 @@ gi_ir_writer_write (const char *filename,
xml_end_element (xml, "repository");
xml_free (xml);
g_clear_object (&repository);
}