mirror of
https://github.com/cuberite/libevent.git
synced 2025-09-13 14:26:30 -04:00
r19607@catbus: nickm | 2008-05-05 13:49:44 -0400
Hack to make sure that there is always a working fast EVENT_FD() svn:r777
This commit is contained in:
parent
4e8a339ef7
commit
957e9fd829
@ -450,6 +450,14 @@ int _event_initialized(struct event *, int check_fd);
|
||||
*/
|
||||
evutil_socket_t event_get_fd(struct event *ev);
|
||||
|
||||
#ifndef EVENT_FD
|
||||
/* We haven't included event_struct.h, so define these as function calls
|
||||
* rather than as direct struct access. If we include event_struct.h later,
|
||||
* these macros will be overridden. */
|
||||
#define EVENT_FD(ev) ((int)event_get_fd(ev))
|
||||
#define EVENT_SIGNAL(ev) ((int)event_get_fd(ev))
|
||||
#endif
|
||||
|
||||
/**
|
||||
Get the libevent version number.
|
||||
|
||||
|
@ -119,8 +119,14 @@ struct event {
|
||||
int ev_flags;
|
||||
};
|
||||
|
||||
#ifdef EVENT_FD
|
||||
/* This was defined in event.h, but since we're including event_struct.h, we
|
||||
* can use the faster versions. */
|
||||
#undef EVENT_FD
|
||||
#undef EVENT_SIGNAL
|
||||
#define EVENT_SIGNAL(ev) ((int)(ev)->ev_fd)
|
||||
#define EVENT_FD(ev) ((int)(ev)->ev_fd)
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Key-Value pairs. Can be used for HTTP headers but also for
|
||||
|
Loading…
x
Reference in New Issue
Block a user