Inside ev.h
of libev, I found some macros that seems weird that can't understand:
173 # define EV_P struct ev_loop *loop /* a loop as sole parameter in a declaration */
174 # define EV_P_ EV_P, /* a loop as first of multiple parameters */
The author defines a macro EV_P_
as EV_P,
and use it as first parameter in function definitions like this:
int ev_run (EV_P_ int flags EV_CPP (= 0));
Curious about why not just write EV_P,
instead of EV_P_
, so the function parameters would looks more clearly with a comma:
int ev_run (EV_P, int flags EV_CPP (= 0));
Is this a trick in C or there are any other reasons? Not familiar with C, Google it before but still have no answers.