Re: [Libevent-users] evbuffer_find versus evbuffer_search

2013-04-10 Thread Nick Mathewson
On Wed, Apr 10, 2013 at 11:12 PM, Sashan Govender wrote: > Hi > > I'm porting some code from libevent 1.4 to 2.0 and in the 1.4 version some > of the code is using evbuffer_find find a pointer to the start of a sequence > then calculating a pointer difference from it: > > u_char* end = evbuffe

[Libevent-users] evbuffer_find versus evbuffer_search

2013-04-10 Thread Sashan Govender
Hi I'm porting some code from libevent 1.4 to 2.0 and in the 1.4 version some of the code is using evbuffer_find find a pointer to the start of a sequence then calculating a pointer difference from it: u_char* end = evbuffer_find(input, pattern, 2); ... ptrdiff_t len = end - input->buffe