mirror of
https://github.com/cuberite/libevent.git
synced 2025-09-09 12:28:19 -04:00
Backport: provide EVENT_LOG_* names, and deprecate _EVENT_LOG_*
This is a partial backport of cb9da0bf and a backport of c9635349. Because C doesn't like us to declare identifiers starting with an underscore, Libevent 2.1 has renamed every such identifier. The only change that affects a public API is that the _EVENT_LOG_* macros have been renamed to start with EVENT_LOG instead. The old names are still present, but deprecated. I'm doing this backport because it represents the deprecation of a Libevent 2.0 interface, and folks should have the opportunity to write code that isn't deprecated and works with both 2.0 and 2.1.
This commit is contained in:
parent
f775521c31
commit
d1a03b2ff1
@ -563,12 +563,19 @@ void event_base_free(struct event_base *);
|
|||||||
/** @name Log severities
|
/** @name Log severities
|
||||||
*/
|
*/
|
||||||
/**@{*/
|
/**@{*/
|
||||||
#define _EVENT_LOG_DEBUG 0
|
#define EVENT_LOG_DEBUG 0
|
||||||
#define _EVENT_LOG_MSG 1
|
#define EVENT_LOG_MSG 1
|
||||||
#define _EVENT_LOG_WARN 2
|
#define EVENT_LOG_WARN 2
|
||||||
#define _EVENT_LOG_ERR 3
|
#define EVENT_LOG_ERR 3
|
||||||
/**@}*/
|
/**@}*/
|
||||||
|
|
||||||
|
/* Obsolete names: these are deprecated, but older programs might use them.
|
||||||
|
* They violate the reserved-identifier namespace. */
|
||||||
|
#define _EVENT_LOG_DEBUG EVENT_LOG_DEBUG
|
||||||
|
#define _EVENT_LOG_MSG EVENT_LOG_MSG
|
||||||
|
#define _EVENT_LOG_WARN EVENT_LOG_WARN
|
||||||
|
#define _EVENT_LOG_ERR EVENT_LOG_ERR
|
||||||
|
|
||||||
/**
|
/**
|
||||||
A callback function used to intercept Libevent's log messages.
|
A callback function used to intercept Libevent's log messages.
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user