gibaseinfo: Fix use of stack-allocated GIBaseInfos
Most of the code for handling stack-allocated infos was correct, it was
just missing code to initialise the GTypeInstance
member.
Since GTypeInstance
isn’t really designed for stack allocation, this
is a little hacky — it requires setting up the member within
GTypeInstance
manually. It works, though.
The externally visible consequence of this, though, is that
stack-allocated GIBaseInfo
s now need to be cleared when they’re
finished being used. This allows the GTypeClass
ref to be dropped.
All users of the stack-allocated APIs in libgirepository will need to adapt to this change.
Signed-off-by: Philip Withnall pwithnall@gnome.org
Fixes: #3218 (closed)
Edited by Marco Trevisan