mirror of
https://github.com/libevent/libevent.git
synced 2025-01-31 09:12:55 +08:00
Rename current_base symbol to event_global_current_base_
The "current_base" symbol was never actually declared in an exported header; it's hideously deprecated, and it was the one remaining exported symbol (fwict) that was prefixed with neither ev nor bufferevent nor _ev nor _bufferevent. codesearch.google.com turns up no actual attempts to use our current_base from outside libevent.
This commit is contained in:
parent
99e50e90bd
commit
c16e68448c
6
event.c
6
event.c
@ -117,10 +117,12 @@ static const struct eventop *eventops[] = {
|
||||
};
|
||||
|
||||
/* Global state; deprecated */
|
||||
struct event_base *current_base = NULL;
|
||||
struct event_base *event_global_current_base_ = NULL;
|
||||
#define current_base event_global_current_base_
|
||||
extern struct event_base *evsig_base;
|
||||
|
||||
/* Global state */
|
||||
extern struct event_base *evsig_base;
|
||||
|
||||
static int use_monotonic;
|
||||
|
||||
/* Prototypes */
|
||||
|
@ -85,11 +85,9 @@ void event_debug_unassign(struct event *);
|
||||
/**
|
||||
Initialize the event API.
|
||||
|
||||
Use event_base_new() to initialize a new event base, but does not set
|
||||
the current_base global. If using only event_base_new(), each event
|
||||
added must have an event base set with event_base_set()
|
||||
Use event_base_new() to initialize a new event base.
|
||||
|
||||
@see event_base_set(), event_base_free(), event_init(),
|
||||
@see event_base_set(), event_base_free(),
|
||||
event_base_new_with_config()
|
||||
*/
|
||||
struct event_base *event_base_new(void);
|
||||
|
@ -53,8 +53,8 @@ extern "C" {
|
||||
Initialize the event API.
|
||||
|
||||
The event API needs to be initialized with event_init() before it can be
|
||||
used. Sets the current_base global representing the default base for
|
||||
events that have no base associated with them.
|
||||
used. Sets the global current base that gets used for events that have no
|
||||
base associated with them.
|
||||
|
||||
@deprecated This function is deprecated because it replaces the "current"
|
||||
event_base, and is totally unsafe for multithreaded use. The replacement
|
||||
|
@ -713,6 +713,7 @@ end:
|
||||
#ifndef WIN32
|
||||
static void signal_cb(evutil_socket_t fd, short event, void *arg);
|
||||
|
||||
#define current_base event_global_current_base_
|
||||
extern struct event_base *current_base;
|
||||
|
||||
static void
|
||||
|
Loading…
x
Reference in New Issue
Block a user