Re: GDataInputStream API break



On Tue, 2009-11-17 at 08:26 -0500, Dan Winship wrote:
> On 11/17/2009 04:54 AM, Alexander Larsson wrote:
> > On Fri, 2009-11-13 at 10:11 -0500, Dan Winship wrote:
> >> On 11/13/2009 08:50 AM, Alexander Larsson wrote:
> >>> Maybe we can do something like:
> >>> Add g_data_input_stream_read_until2() which doesn't consume the input.
> >>> #define g_data_input_stream_read_until g_data_input_stream_read_until2
> >>
> >> That still breaks the API; programs expecting the old behavior will be
> >> silently switched to the new behavior when they are recompiled.
> > 
> > Yes, but hopefully some will run with new glib and not rebuild app and
> > catch the warning?
> > 
> > Its not the ideal solution, but is there a better?
> 
> Rename the method completely, leaving the old functionality still there
> under the old name (but presumably deprecated). Or do the #define
> renaming as you suggested but change the prototype at the same time, so
> that programs expecting the old behavior won't compile against the new
> library.

Hmmm, even changing the prototype would only create a warning.

I guess we should bit the bullet and just do this correctly, deprecating
the old function and creating a new one. Not sure what to best name it
though.

g_data_input_stream_read_until_found maybe?



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