Re: GDataInputStream API break
- From: Alexander Larsson <alexl redhat com>
- To: Ryan Lortie <desrt desrt ca>
- Cc: gtk-devel-list gnome org
- Subject: Re: GDataInputStream API break
- Date: Tue, 17 Nov 2009 10:59:29 +0100
On Fri, 2009-11-13 at 11:30 -0500, Ryan Lortie wrote:
> On Fri, 2009-11-13 at 14:50 +0100, Alexander Larsson wrote:
> > I don't like breaking API like this. Especially since I think its the
> > sync call that is really broken, and we should not also break the async
> > one.
>
> Ok. Some questions from when I went to do the patch:
>
> What happens in the case that I repeatedly call read_until() on a stream
> with the same separator characters (when those characters have been
> reached by a previous call already)?
>
> It should return NULL and length == 0? It should return non-NULL and
> length == 0? Should it do this in an infinite loop forever?
It should return a non-NULL (char array of length 1 with a zero in it)
and length == 0.
Obviously this will recurse forever if you don't read the separator
characters between the calls. Is this a problem though? It seems
important to me that you need to do this as otherwise you don't know
what exactly the separator char was.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]