diff options
author | Colin Walters <walters@verbum.org> | 2009-09-04 16:52:35 -0400 |
---|---|---|
committer | Colin Walters <walters@verbum.org> | 2009-09-04 16:52:35 -0400 |
commit | f0edd87e607cccc41946ddbd003593841b028e7c (patch) | |
tree | e32997bd0bfdf44dd3a75e6337cd8c807d17444a | |
parent | 75dcb100724f97117d518b1831e3965e3e0cf5ed (diff) | |
download | gobject-introspection-f0edd87e607cccc41946ddbd003593841b028e7c.tar.gz |
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>
-rw-r--r-- | girepository/ginfo.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/girepository/ginfo.c b/girepository/ginfo.c index e7b0b8bd..19723dd1 100644 --- a/girepository/ginfo.c +++ b/girepository/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; |