… | |
… | |
186 | # define ev_async_send(l,w) GEVAPI->async_send ((l), (w)) |
186 | # define ev_async_send(l,w) GEVAPI->async_send ((l), (w)) |
187 | #endif |
187 | #endif |
188 | |
188 | |
189 | static struct EVAPI *GEVAPI; |
189 | static struct EVAPI *GEVAPI; |
190 | |
190 | |
191 | #define I_EV_API(YourName) \ |
191 | #define I_EV_API(YourName) \ |
192 | STMT_START { \ |
192 | STMT_START { \ |
193 | SV *sv = perl_get_sv ("EV::API", 0); \ |
193 | SV *sv = perl_get_sv ("EV::API", 0); \ |
194 | if (!sv) croak ("EV::API not found"); \ |
194 | if (!sv) croak ("EV::API not found"); \ |
195 | GEVAPI = (struct EVAPI*) SvIV (sv); \ |
195 | GEVAPI = (struct EVAPI*) SvIV (sv); \ |
196 | if (GEVAPI->ver != EV_API_VERSION \ |
196 | if (GEVAPI->ver != EV_API_VERSION \ |
197 | || GEVAPI->rev < EV_API_REVISION) \ |
197 | || GEVAPI->rev < EV_API_REVISION) \ |
198 | croak ("EV::API version mismatch (%d.%d vs. %d.%d) -- please recompile '%s'", \ |
198 | croak ("EV::API version mismatch (%d.%d vs. %d.%d) -- please recompile '%s'", \ |
199 | GEVAPI->ver, GEVAPI->rev, EV_API_VERSION, EV_API_REVISION, YourName); \ |
199 | (int)GEVAPI->ver, (int)GEVAPI->rev, EV_API_VERSION, EV_API_REVISION, YourName); \ |
200 | } STMT_END |
200 | } STMT_END |
201 | |
201 | |
202 | #endif |
202 | #endif |
203 | |
203 | |