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

Re: [Libevent-users] struct evbuffer is internal which will cause "error C2037: left of 'parent' specifies undefined struct/union 'evbuffer'"



On Thu, Nov 24, 2011 at 8:49 PM, ææå <lypkiller@xxxxxxxxx> wrote:
> Hi all,
> Â I found a blemish in the struct evbuffer, which has a member: parent. The
> testing libevent is 2.0.15.
> Â when i tried to get the "parent" bufferevent from evbuffer, like below:
> ÂÂÂÂÂ #include "event2/event.h"
> ÂÂÂÂÂ #include "event2/buffer.h"
> ÂÂÂÂÂ #include "event2/bufferevent.h"
> ÂÂÂÂ //...ship something....
> ÂÂÂÂ struct evbuffer test;
> ÂÂÂÂ struct bufferevent *bev = test.parent.

This is just plain unsupported.  The definition of struct evbuffer is
an implementation detail; programs shouldn't need to access it (or to
allocate struct evbuffer on the stack, for that matter).

Any program that includes one of the "...-internal.h" headers, or that
accesses a field of a struct defined only in one of those headers,
should not expect to work with future versions of libevent -- those
are not public, supported APIs.

-- 
Nick
***********************************************************************
To unsubscribe, send an e-mail to majordomo@xxxxxxxxxxxxx with
unsubscribe libevent-users    in the body.