1 | #include "EXTERN.h" |
1 | #include "EXTERN.h" |
2 | #include "perl.h" |
2 | #include "perl.h" |
3 | #include "XSUB.h" |
3 | #include "XSUB.h" |
4 | |
4 | |
5 | /*#include <netinet/in.h>*/ |
5 | /*#include <netinet/in.h>*/ |
|
|
6 | |
|
|
7 | /* fix perl api breakage */ |
|
|
8 | #undef signal |
|
|
9 | #undef sigaction |
6 | |
10 | |
7 | #define EV_PROTOTYPES 1 |
11 | #define EV_PROTOTYPES 1 |
8 | #define EV_USE_NANOSLEEP EV_USE_MONOTONIC |
12 | #define EV_USE_NANOSLEEP EV_USE_MONOTONIC |
9 | #define EV_H <ev.h> |
13 | #define EV_H <ev.h> |
10 | #include "EV/EVAPI.h" |
14 | #include "EV/EVAPI.h" |
11 | |
|
|
12 | /* fix perl api breakage */ |
|
|
13 | #undef signal |
|
|
14 | #undef sigaction |
|
|
15 | |
15 | |
16 | #define EV_SELECT_IS_WINSOCKET 0 |
16 | #define EV_SELECT_IS_WINSOCKET 0 |
17 | #ifdef _WIN32 |
17 | #ifdef _WIN32 |
18 | # define EV_SELECT_USE_FD_SET 0 |
18 | # define EV_SELECT_USE_FD_SET 0 |
19 | # define NFDBITS PERL_NFDBITS |
19 | # define NFDBITS PERL_NFDBITS |
… | |
… | |
390 | evapi.sv_fileno = sv_fileno; |
390 | evapi.sv_fileno = sv_fileno; |
391 | evapi.sv_signum = sv_signum; |
391 | evapi.sv_signum = sv_signum; |
392 | evapi.supported_backends = ev_supported_backends (); |
392 | evapi.supported_backends = ev_supported_backends (); |
393 | evapi.recommended_backends = ev_recommended_backends (); |
393 | evapi.recommended_backends = ev_recommended_backends (); |
394 | evapi.embeddable_backends = ev_embeddable_backends (); |
394 | evapi.embeddable_backends = ev_embeddable_backends (); |
395 | evapi.time = ev_time; |
395 | evapi.time_ = ev_time; |
396 | evapi.sleep = ev_sleep; |
396 | evapi.sleep_ = ev_sleep; |
397 | evapi.loop_new = ev_loop_new; |
397 | evapi.loop_new = ev_loop_new; |
398 | evapi.loop_destroy = ev_loop_destroy; |
398 | evapi.loop_destroy = ev_loop_destroy; |
399 | evapi.loop_fork = ev_loop_fork; |
399 | evapi.loop_fork = ev_loop_fork; |
400 | evapi.loop_count = ev_loop_count; |
400 | evapi.loop_count = ev_loop_count; |
401 | evapi.now = ev_now; |
401 | evapi.now = ev_now; |
… | |
… | |
1147 | CODE: |
1147 | CODE: |
1148 | RETVAL = newSVsv (w->fh); |
1148 | RETVAL = newSVsv (w->fh); |
1149 | OUTPUT: |
1149 | OUTPUT: |
1150 | RETVAL |
1150 | RETVAL |
1151 | |
1151 | |
|
|
1152 | void ev_embed_sweep (ev_embed *w) |
|
|
1153 | C_ARGS: e_loop (w), w |
|
|
1154 | |
1152 | MODULE = EV PACKAGE = EV::Async PREFIX = ev_async_ |
1155 | MODULE = EV PACKAGE = EV::Async PREFIX = ev_async_ |
1153 | |
1156 | |
1154 | void ev_async_start (ev_async *w) |
1157 | void ev_async_start (ev_async *w) |
1155 | CODE: |
1158 | CODE: |
1156 | START (async, w); |
1159 | START (async, w); |
… | |
… | |
1161 | |
1164 | |
1162 | void DESTROY (ev_async *w) |
1165 | void DESTROY (ev_async *w) |
1163 | CODE: |
1166 | CODE: |
1164 | STOP (async, w); |
1167 | STOP (async, w); |
1165 | e_destroy (w); |
1168 | e_destroy (w); |
|
|
1169 | |
|
|
1170 | void ev_async_send (ev_async *w) |
|
|
1171 | C_ARGS: e_loop (w), w |
|
|
1172 | |
|
|
1173 | SV *ev_async_async_pending (ev_async *w) |
|
|
1174 | CODE: |
|
|
1175 | RETVAL = boolSV (ev_async_pending (w)); |
|
|
1176 | OUTPUT: |
|
|
1177 | RETVAL |
1166 | |
1178 | |
1167 | MODULE = EV PACKAGE = EV::Loop PREFIX = ev_ |
1179 | MODULE = EV PACKAGE = EV::Loop PREFIX = ev_ |
1168 | |
1180 | |
1169 | SV *new (SV *klass, unsigned int flags = 0) |
1181 | SV *new (SV *klass, unsigned int flags = 0) |
1170 | CODE: |
1182 | CODE: |