mirror of /home/gitosis/repositories/libev.git
c++ should die
parent
13a2c71b59
commit
cae6cecf28
4
Changes
4
Changes
|
@ -16,7 +16,9 @@ TODO: possible cb aliasing?
|
|||
TODO: document requirements for function pointers and calling conventions.
|
||||
|
||||
- ev.h wasn't valid C++ anymore, which tripped compilers other than
|
||||
clang, msvc or gcc (analyzed by Raphael 'kena' Poss).
|
||||
clang, msvc or gcc (analyzed by Raphael 'kena' Poss). Unfortunately,
|
||||
C++ doesn't support typedefs for function pointers fully, so the affected
|
||||
declarations have to spell out the types each time.
|
||||
- when not using autoconf, tighten the check for clock_gettime and related
|
||||
functionality.
|
||||
|
||||
|
|
2
ev.c
2
ev.c
|
@ -2615,7 +2615,7 @@ ev_set_invoke_pending_cb (EV_P_ ev_loop_callback invoke_pending_cb) EV_THROW
|
|||
}
|
||||
|
||||
void
|
||||
ev_set_loop_release_cb (EV_P_ ev_loop_callback EV_THROW release, ev_loop_callback EV_THROW acquire) EV_THROW
|
||||
ev_set_loop_release_cb (EV_P_ void (*release)(EV_P) EV_THROW, void (*acquire)(EV_P) EV_THROW) EV_THROW
|
||||
{
|
||||
release_cb = release;
|
||||
acquire_cb = acquire;
|
||||
|
|
11
ev.h
11
ev.h
|
@ -48,14 +48,6 @@
|
|||
|
||||
#define EV_THROW EV_CPP(throw())
|
||||
|
||||
/* apple's proprietary clang fork errors out with exception specifications */
|
||||
/* in all sorts of places, so let's not even bother with them */
|
||||
/* users are strongly advised to install clang or gcc */
|
||||
#if __APPLE__ && __clang__
|
||||
# undef EV_THROW
|
||||
# define EV_THROW
|
||||
#endif
|
||||
|
||||
EV_CPP(extern "C" {)
|
||||
|
||||
/*****************************************************************************/
|
||||
|
@ -668,7 +660,8 @@ EV_API_DECL void ev_set_userdata (EV_P_ void *data) EV_THROW;
|
|||
EV_API_DECL void *ev_userdata (EV_P) EV_THROW;
|
||||
typedef void (*ev_loop_callback)(EV_P);
|
||||
EV_API_DECL void ev_set_invoke_pending_cb (EV_P_ ev_loop_callback invoke_pending_cb) EV_THROW;
|
||||
EV_API_DECL void ev_set_loop_release_cb (EV_P_ ev_loop_callback EV_THROW release, ev_loop_callback EV_THROW acquire) EV_THROW;
|
||||
/* C++ doesn't allow the use of the ev_loop_callback typedef here, so we need to spell it out*/
|
||||
EV_API_DECL void ev_set_loop_release_cb (EV_P_ void (*release)(EV_P) EV_THROW, void (*acquire)(EV_P) EV_THROW) EV_THROW;
|
||||
|
||||
EV_API_DECL unsigned int ev_pending_count (EV_P) EV_THROW; /* number of pending events, if any */
|
||||
EV_API_DECL void ev_invoke_pending (EV_P); /* invoke all pending watchers */
|
||||
|
|
|
@ -194,8 +194,9 @@ VARx(unsigned int, loop_count) /* total number of loop iterations/blocks */
|
|||
VARx(unsigned int, loop_depth) /* #ev_run enters - #ev_run leaves */
|
||||
|
||||
VARx(void *, userdata)
|
||||
VAR (release_cb, ev_loop_callback EV_THROW release_cb)
|
||||
VAR (acquire_cb, ev_loop_callback EV_THROW acquire_cb)
|
||||
/* C++ doesn't support the ev_loop_callback typedef here. stinks. */
|
||||
VAR (release_cb, void (*release_cb)(EV_P) EV_THROW)
|
||||
VAR (acquire_cb, void (*acquire_cb)(EV_P) EV_THROW)
|
||||
VAR (invoke_cb , ev_loop_callback invoke_cb)
|
||||
#endif
|
||||
|
||||
|
|
Loading…
Reference in New Issue