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

[Libevent-users] evbuffer_find versus evbuffer_search



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->buffer;

But in 2.0 the evbuffer struct is now opaque and I can't access members of it (i.e. the dereference here input->buffer will not compile). How should I change this so that it works with 2.0.

Thanks