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.47 by root, Sat Nov 3 21:58:51 2007 UTC

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

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines