mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2024-11-10 19:36:18 +01:00
Bug 593322 - Fix unref of GIUnresolvedInfo instances
We are treating GIUnresolvedInfo as a GIBaseInfo, but the structures had drifted out of sync. Add a repository pointer and bring them back into sync. Based on a report and patch from Jan Hudec <bulb@ucw.cz>
This commit is contained in:
parent
1735ebde9a
commit
5f6b975d87
8
ginfo.c
8
ginfo.c
@ -30,21 +30,28 @@
|
||||
|
||||
struct _GIBaseInfo
|
||||
{
|
||||
/* Keep this part in sync with GIUnresolvedInfo below */
|
||||
gint type;
|
||||
gint ref_count;
|
||||
GIRepository *repository;
|
||||
GIBaseInfo *container;
|
||||
|
||||
/* Resolved specific */
|
||||
|
||||
GTypelib *typelib;
|
||||
guint32 offset;
|
||||
};
|
||||
|
||||
struct _GIUnresolvedInfo
|
||||
{
|
||||
/* Keep this part in sync with GIBaseInfo above */
|
||||
gint type;
|
||||
gint ref_count;
|
||||
GIRepository *repository;
|
||||
GIBaseInfo *container;
|
||||
|
||||
/* Unresolved specific */
|
||||
|
||||
const gchar *name;
|
||||
const gchar *namespace;
|
||||
};
|
||||
@ -196,6 +203,7 @@ g_info_from_entry (GIRepository *repository,
|
||||
|
||||
unresolved->type = GI_INFO_TYPE_UNRESOLVED;
|
||||
unresolved->ref_count = 1;
|
||||
unresolved->repository = repository;
|
||||
unresolved->container = NULL;
|
||||
unresolved->name = name;
|
||||
unresolved->namespace = namespace;
|
||||
|
Loading…
Reference in New Issue
Block a user