[Libevent-users] [PATCH] remove useless argument in
bufferevent_read_pressure_cb
Nick Mathewson
nickm at freehaven.net
Thu Nov 8 15:24:58 EST 2007
On Thu, Nov 08, 2007 at 09:15:18PM +0100, Charles Longeau wrote:
> Hi,
>
> > bufferevent_read_pressure_cb() may not use the second argument, but
> > other users of the evbuffer API can and likely do. (The evbuffer API
> > is, after all, exported in event.h.)
> >
> > I don't want to break existing code if I can help it.
>
> I understand that breaking existing API is not a good solution.
>
> However, we can still avoid passing unneeded arguments to
> bufferevent_read_pressure_cb.
>
> Here's an updated patch which removes unneeded arguments without
> breaking the evbuffer API.
I'm afraid that will still break existing code. Any applications that
are using evbuffer will expect to get the old buffer size passed to
their callback. For example, they may want to know how much data was
just added to the buffer. If they get 0 instead of the original
buffer length, they will compute an incorrect answer for how much data
was just added.
yrs,
--
Nick Mathewson
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 652 bytes
Desc: not available
Url : http://monkeymail.org/archives/libevent-users/attachments/20071108/5035d77b/attachment.bin
More information about the Libevent-users
mailing list