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

Comparing EV/EV.xs (file contents):
Revision 1.24 by root, Wed Oct 31 20:10:17 2007 UTC vs.
Revision 1.28 by root, Wed Oct 31 21:50:15 2007 UTC

242 242
243 for (civ = const_iv + sizeof (const_iv) / sizeof (const_iv [0]); civ-- > const_iv; ) 243 for (civ = const_iv + sizeof (const_iv) / sizeof (const_iv [0]); civ-- > const_iv; )
244 newCONSTSUB (stash, (char *)civ->name, newSViv (civ->iv)); 244 newCONSTSUB (stash, (char *)civ->name, newSViv (civ->iv));
245 245
246 stash_watcher = gv_stashpv ("EV::Watcher" , 1); 246 stash_watcher = gv_stashpv ("EV::Watcher" , 1);
247 stash_io = gv_stashpv ("EV::IO" , 1); 247 stash_io = gv_stashpv ("EV::Io" , 1);
248 stash_time = gv_stashpv ("EV::Time" , 1); 248 stash_time = gv_stashpv ("EV::Time" , 1);
249 stash_timer = gv_stashpv ("EV::Timer" , 1); 249 stash_timer = gv_stashpv ("EV::Timer" , 1);
250 stash_periodic = gv_stashpv ("EV::Periodic", 1); 250 stash_periodic = gv_stashpv ("EV::Periodic", 1);
251 stash_signal = gv_stashpv ("EV::Signal" , 1); 251 stash_signal = gv_stashpv ("EV::Signal" , 1);
252 stash_idle = gv_stashpv ("EV::Idle" , 1); 252 stash_idle = gv_stashpv ("EV::Idle" , 1);
387 evcheck_set (RETVAL); 387 evcheck_set (RETVAL);
388 if (!ix) evcheck_start (RETVAL); 388 if (!ix) evcheck_start (RETVAL);
389 OUTPUT: 389 OUTPUT:
390 RETVAL 390 RETVAL
391 391
392struct ev_child *child (SV *cb, int pid) 392struct ev_child *child (int pid, SV *cb)
393 ALIAS: 393 ALIAS:
394 check_ns = 1 394 check_ns = 1
395 CODE: 395 CODE:
396 RETVAL = e_new (sizeof (struct ev_check), cb); 396 RETVAL = e_new (sizeof (struct ev_check), cb);
397 evchild_set (RETVAL, pid); 397 evchild_set (RETVAL, pid);
415 sv_setsv (w->cb_sv, new_cb); 415 sv_setsv (w->cb_sv, new_cb);
416} 416}
417 OUTPUT: 417 OUTPUT:
418 RETVAL 418 RETVAL
419 419
420void trigger (struct ev_watcher *w, int revents = EV_NONE)
421 CODE:
422 w->cb (w, revents);
423
420MODULE = EV PACKAGE = EV::IO PREFIX = evio_ 424MODULE = EV PACKAGE = EV::Io PREFIX = evio_
421 425
422void evio_start (struct ev_io *w) 426void evio_start (struct ev_io *w)
423 427
424void evio_stop (struct ev_io *w) 428void evio_stop (struct ev_io *w)
429
430void DESTROY (struct ev_io *w)
431 CODE:
432 evio_stop (w);
425 433
426void set (struct ev_io *w, SV *fh, int events) 434void set (struct ev_io *w, SV *fh, int events)
427 CODE: 435 CODE:
428{ 436{
429 int active = w->active; 437 int active = w->active;
476 484
477void evsignal_start (struct ev_signal *w) 485void evsignal_start (struct ev_signal *w)
478 486
479void evsignal_stop (struct ev_signal *w) 487void evsignal_stop (struct ev_signal *w)
480 488
489void DESTROY (struct ev_signal *w)
490 CODE:
491 evsignal_stop (w);
492
481void set (struct ev_signal *w, SV *signal = 0) 493void set (struct ev_signal *w, SV *signal = 0)
482 CODE: 494 CODE:
483{ 495{
484 Signal signum = sv_signum (signal); /* may croak here */ 496 Signal signum = sv_signum (signal); /* may croak here */
485 int active = w->active; 497 int active = w->active;
500void evtimer_stop (struct ev_timer *w) 512void evtimer_stop (struct ev_timer *w)
501 513
502void evtimer_again (struct ev_timer *w) 514void evtimer_again (struct ev_timer *w)
503 INIT: 515 INIT:
504 CHECK_REPEAT (w->repeat); 516 CHECK_REPEAT (w->repeat);
517
518void DESTROY (struct ev_timer *w)
519 CODE:
520 evtimer_stop (w);
505 521
506void set (struct ev_timer *w, NV after, NV repeat = 0.) 522void set (struct ev_timer *w, NV after, NV repeat = 0.)
507 INIT: 523 INIT:
508 CHECK_REPEAT (repeat); 524 CHECK_REPEAT (repeat);
509 CODE: 525 CODE:
520 INIT: 536 INIT:
521 CHECK_REPEAT (w->interval); 537 CHECK_REPEAT (w->interval);
522 538
523void evperiodic_stop (struct ev_periodic *w) 539void evperiodic_stop (struct ev_periodic *w)
524 540
541void DESTROY (struct ev_periodic *w)
542 CODE:
543 evperiodic_stop (w);
544
525void set (struct ev_periodic *w, NV at, NV interval = 0.) 545void set (struct ev_periodic *w, NV at, NV interval = 0.)
526 INIT: 546 INIT:
527 CHECK_REPEAT (interval); 547 CHECK_REPEAT (interval);
528 CODE: 548 CODE:
529{ 549{
537 557
538void evidle_start (struct ev_idle *w) 558void evidle_start (struct ev_idle *w)
539 559
540void evidle_stop (struct ev_idle *w) 560void evidle_stop (struct ev_idle *w)
541 561
562void DESTROY (struct ev_idle *w)
563 CODE:
564 evidle_stop (w);
565
542MODULE = EV PACKAGE = EV::Prepare PREFIX = evcheck_ 566MODULE = EV PACKAGE = EV::Prepare PREFIX = evcheck_
543 567
544void evprepare_start (struct ev_prepare *w) 568void evprepare_start (struct ev_prepare *w)
545 569
546void evprepare_stop (struct ev_prepare *w) 570void evprepare_stop (struct ev_prepare *w)
547 571
572void DESTROY (struct ev_prepare *w)
573 CODE:
574 evprepare_stop (w);
575
548MODULE = EV PACKAGE = EV::Check PREFIX = evcheck_ 576MODULE = EV PACKAGE = EV::Check PREFIX = evcheck_
549 577
550void evcheck_start (struct ev_check *w) 578void evcheck_start (struct ev_check *w)
551 579
552void evcheck_stop (struct ev_check *w) 580void evcheck_stop (struct ev_check *w)
553 581
582void DESTROY (struct ev_check *w)
583 CODE:
584 evcheck_stop (w);
585
554MODULE = EV PACKAGE = EV::Child PREFIX = evchild_ 586MODULE = EV PACKAGE = EV::Child PREFIX = evchild_
555 587
556void evchild_start (struct ev_child *w) 588void evchild_start (struct ev_child *w)
557 589
558void evchild_stop (struct ev_child *w) 590void evchild_stop (struct ev_child *w)
591
592void DESTROY (struct ev_child *w)
593 CODE:
594 evchild_stop (w);
559 595
560void set (struct ev_child *w, int pid) 596void set (struct ev_child *w, int pid)
561 CODE: 597 CODE:
562{ 598{
563 int active = w->active; 599 int active = w->active;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines