ABI and API for g_object_ref_sink() (Re: GTK_FLOATING broken in 2.9?)
- From: Tim Janik <timj imendio com>
- To: Dave Benson <daveb idealab com>
- Cc: Gtk+ Developers <gtk-devel-list gnome org>
- Subject: ABI and API for g_object_ref_sink() (Re: GTK_FLOATING broken in 2.9?)
- Date: Fri, 16 Dec 2005 00:29:18 +0100 (CET)
On Thu, 15 Dec 2005, Dave Benson wrote:
There is no problem in this combination. GTK+ 2.8 continues to use the
GtkObject floating flag,
and does not care about the GObject floating flag at all. We decided to
allow finalizing floating GObjects,
so there is no problem.
as long as no-one g_object_sink()s a GtkObject, right?
thanks for raising this dave.
this is indeed an important concern and needs to be taken care of.
what i have in mind now is something that sorts out the ABI
and new API issues for the cases we actually worry about:
- glib-2.10 together with gtk+-2.10.
- running glib-2.10 together with gtk+-2.8.10 (the next gtk+-2.8 release)
since you can call g_object_ref_sink() here, we essentially need to
make it work with Gtk+-2.8.10 as well
to implement that, we'll add a gtk-specific compat hook to glib-2.8.5 (the
next glib-2.8 release), and to glib-2.10.
in the 2.10 version, this compat hook will relay GObject floationg changes
to GTK_FLOATING in GtkObject.flags.
the possible library combination are then:
- gtk+ >= 2.10, glib >= 2.10: has gobject sinking, does relay to GtkObject
- gtk+ >= 2.8.10, glib >= 2.10: has gobject sinking, does relay to GtkObject
this is what the next gnome release will use
- gtk+ >= 2.8.10, glib >= 2.8.5: does not have gobject sinking;
however gtk+ >= 2.8.10 will have to depend on glib >= 2.8.5
to be able to call a dummy g_object__internal_gtkhook();
- gtk+ <= 2.8.9, glib >= 2.10: potential ABI/API breakage;
this version combination can show buggy behaviour if g_object_ref_sink()
is called on a GtkObject. in order to avoid that, applications or libraries
that want to use g_object_ref_sink() can simply depend on gtk+ >= 2.8.10.
i think this is a good enough compromise. we'll allow potential breakage
if applications/libraries don't care to implement their dependencies
properly. i hope that is weak enough to not occour or be easily fixable
in practice. to help with that, it should be outlined in the docs and
release notes of course.
basically, a rule of thumb for applications will be that if they depend on
glib-2.10 for some reason *and* also depend on gtk+, they should make sure
to at least depend on gtk+-2.8.10. this will be the case for the next
gnome release.
- dave
---
ciaoTJ
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]