[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[Libevent-users] struct evbuffer is internal which will cause "error C2037: left of 'parent' specifies undefined struct/union 'evbuffer'"
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.
It will cause "error C2037: left of 'parent' specifies undefined struct/union 'evbuffer' " with VC++, I saw the struct evbuffer is defined by "evbuffer-internal.h", which indicates it's used by inside. As i think, it'd better moving the struct evbuffer to a separate header file like "bufferevent_struct.h".
Is it right? waiting your feedback.
Best Regards,
vincent.lee