API/ABI break request



The GdkPixbuf "simple animation" class implementation [1] uses an
internal iterator type. Unfortunately, the GObject type instantiation
function accidentally was placed in the header file instead of being a
static function in the source file.

Johan noticed a crash in the new "defaultvaluetest" when the iter's
finalize vfunc was called. The iter was created via g_object_new().

This function/type should have never been public. The only way to get
a valid iter is to use the animation class' get_iter() vfunc.

So, what should we do? Some options:

1) Work around the crash (which can only happen if you instantiate one
of these via g_object_new())
2) Remove this from the public API/ABI and pretend it never happened
3) Keep the function, but make it return G_TYPE_INVALID, and rename
the function internally

I'd vote for #2. There's precedent for breaking API/ABI, and there was
no way anyone ever created and successfully used one of these iters
via g_object_new(). If you did this, your program would crash.

Thanks,
Dom

1: http://svn.gnome.org/viewvc/gtk%2B/trunk/gdk-pixbuf/gdk-pixbuf-simple-anim.h?view=markup


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]