mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-07-24 10:57:53 +02:00
gitypelib: Switch to refcounting
Since `GITypelib` is exposed in the public libgirepository API, it needs to be a boxed type. So we either need to add a `copy` method to mirror the existing `free` method, or switch to refcounting. The latter option seems better, since a `GITypelib` contains internal state about open `GModule`s and the semantics for copying that would be potentially complex. Signed-off-by: Philip Withnall <pwithnall@gnome.org> Helps: #3155
This commit is contained in:
@@ -218,7 +218,7 @@ main (int argc, char **argv)
|
||||
g_debug ("[building] start");
|
||||
|
||||
{
|
||||
GITypelib *typelib;
|
||||
GITypelib *typelib = NULL;
|
||||
|
||||
if (shlibs)
|
||||
{
|
||||
@@ -238,8 +238,8 @@ main (int argc, char **argv)
|
||||
|
||||
if (!write_out_typelib (NULL, typelib))
|
||||
return 1;
|
||||
gi_typelib_free (typelib);
|
||||
typelib = NULL;
|
||||
|
||||
g_clear_pointer (&typelib, gi_typelib_unref);
|
||||
}
|
||||
|
||||
g_debug ("[building] done");
|
||||
|
Reference in New Issue
Block a user