ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/EV/EV.xs
(Generate patch)

Comparing EV/EV.xs (file contents):
Revision 1.46 by root, Sat Nov 3 10:37:28 2007 UTC vs.
Revision 1.49 by root, Sun Nov 4 16:43:53 2007 UTC

8#include "EV/EVAPI.h" 8#include "EV/EVAPI.h"
9 9
10#include "libev/ev.c" 10#include "libev/ev.c"
11#include "libev/event.h" 11#include "libev/event.h"
12#include "libev/event.c" 12#include "libev/event.c"
13#define DNS_USE_GETTIMEOFDAY_FOR_ID 1
14#define HAVE_STRUCT_IN6_ADDR 1
15#undef HAVE_STRTOK_R
16#undef strtok_r
17#define strtok_r fake_strtok_r
13#include "libev/evdns.c" 18#include "libev/evdns.c"
14 19
15typedef int Signal; 20typedef int Signal;
16 21
17static struct EVAPI evapi; 22static struct EVAPI evapi;
282 /* the poor man's shared library emulator */ 287 /* the poor man's shared library emulator */
283 evapi.ver = EV_API_VERSION; 288 evapi.ver = EV_API_VERSION;
284 evapi.rev = EV_API_REVISION; 289 evapi.rev = EV_API_REVISION;
285 evapi.sv_fileno = sv_fileno; 290 evapi.sv_fileno = sv_fileno;
286 evapi.sv_signum = sv_signum; 291 evapi.sv_signum = sv_signum;
287 evapi.now = &ev_now; 292 evapi.now = ev_now;
288 evapi.method = &ev_method; 293 evapi.method = ev_method;
289 evapi.loop_done = &ev_loop_done; 294 evapi.unloop = ev_unloop;
290 evapi.time = ev_time; 295 evapi.time = ev_time;
291 evapi.loop = ev_loop; 296 evapi.loop = ev_loop;
292 evapi.once = ev_once; 297 evapi.once = ev_once;
293 evapi.io_start = ev_io_start; 298 evapi.io_start = ev_io_start;
294 evapi.io_stop = ev_io_stop; 299 evapi.io_stop = ev_io_stop;
310 315
311 sv_setiv (sv, (IV)&evapi); 316 sv_setiv (sv, (IV)&evapi);
312 SvREADONLY_on (sv); 317 SvREADONLY_on (sv);
313 } 318 }
314 319
315 pthread_atfork (ev_fork_prepare, ev_fork_parent, ev_fork_child); 320 pthread_atfork (0, 0, ev_default_fork);
316} 321}
317 322
318NV ev_now () 323NV ev_now ()
319 CODE:
320 RETVAL = ev_now;
321 OUTPUT:
322 RETVAL
323 324
324int ev_method () 325int ev_method ()
325 CODE:
326 RETVAL = ev_method;
327 OUTPUT:
328 RETVAL
329 326
330NV ev_time () 327NV ev_time ()
331 328
332int ev_init (int methods = EVMETHOD_AUTO) 329int ev_init (int methods = EVMETHOD_AUTO)
333 330
334void ev_loop (int flags = 0) 331void ev_loop (int flags = 0)
335 332
336void ev_loop_done (int value = 1) 333void ev_unloop (int how = 1)
337 CODE:
338 ev_loop_done = value;
339 334
340struct ev_io *io (SV *fh, int events, SV *cb) 335struct ev_io *io (SV *fh, int events, SV *cb)
341 ALIAS: 336 ALIAS:
342 io_ns = 1 337 io_ns = 1
343 CODE: 338 CODE:

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines