mirror of
https://github.com/libevent/libevent.git
synced 2025-01-09 00:56:20 +08:00
Add an event_get_base() function to remove one more reason to include event_struct.h
svn:r1271
This commit is contained in:
parent
0e63e72a05
commit
0fd70978c8
@ -15,6 +15,7 @@ Changes in 2.0.2-alpha:
|
||||
o Try harder to compile with Visual C++.
|
||||
o Move event_set() and its allies to event2/event_compat.h where they belong.
|
||||
o Remove the event_gotsig code, which has long been deprecated and unused.
|
||||
o Add an event_get_base() function to return the base assigned to an event.
|
||||
|
||||
|
||||
Changes in 2.0.1-alpha:
|
||||
|
6
event.c
6
event.c
@ -1095,6 +1095,12 @@ event_get_fd(struct event *ev)
|
||||
return ev->ev_fd;
|
||||
}
|
||||
|
||||
struct event_base *
|
||||
event_get_base(struct event *ev)
|
||||
{
|
||||
return ev->ev_base;
|
||||
}
|
||||
|
||||
int
|
||||
event_add(struct event *ev, const struct timeval *tv)
|
||||
{
|
||||
|
@ -503,6 +503,11 @@ int _event_initialized(struct event *, int check_fd);
|
||||
*/
|
||||
evutil_socket_t event_get_fd(struct event *ev);
|
||||
|
||||
/**
|
||||
Get the event_base assigned to an event.
|
||||
*/
|
||||
struct event_base *event_get_base(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,
|
||||
|
Loading…
x
Reference in New Issue
Block a user