GDataInputStream API break


I want to make a small break to the API of GDataInputStream.

The details are in bug #584284.

The summary:

When I implemented the async versions of read_line() and read_until() I
got the semantics of the read_until_async() function very slightly
different than the read_until() one.  Specifically: read_until() will
consume the separator character, and read_until_async() will not.  My

In my defence, the documentation has no verbiage to indicate that the
separator character will be consumed by either function and in the
absence of such statements I'd believe that it wouldn't.

I agree with the reporter that it is sufficiently weird to have
slightly-different async vs. sync version that is warrants breaking the
API.  I also believe that it is likely that the _async() version has
seen less use, so probably fewer problems would be caused by changing it
rather than the synchronous one.

I've attached a patch to the bug to modify the behaviour of the function
and I'd like to commit that patch along with some clarifications to the
documentation that the separator character will be consumed.


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