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

Comparing EV/EV.xs (file contents):
Revision 1.147 by root, Thu Oct 28 04:59:35 2010 UTC vs.
Revision 1.151 by root, Thu Dec 30 07:28:47 2010 UTC

208 208
209 if (expect_true (sv_events_cache)) 209 if (expect_true (sv_events_cache))
210 { 210 {
211 sv_events = sv_events_cache; sv_events_cache = 0; 211 sv_events = sv_events_cache; sv_events_cache = 0;
212 SvIV_set (sv_events, revents); 212 SvIV_set (sv_events, revents);
213 SvIOK_only (sv_events);
213 } 214 }
214 else 215 else
215 { 216 {
216 sv_events = newSViv (revents); 217 sv_events = newSViv (revents);
217 SvREADONLY_on (sv_events); 218 SvREADONLY_on (sv_events);
341 croak ("illegal file descriptor or filehandle (either no attached file descriptor or illegal value): %s", SvPV_nolen (fh)); 342 croak ("illegal file descriptor or filehandle (either no attached file descriptor or illegal value): %s", SvPV_nolen (fh));
342 343
343#define CHECK_SIG(sv,num) if ((num) < 0) \ 344#define CHECK_SIG(sv,num) if ((num) < 0) \
344 croak ("illegal signal number or name: %s", SvPV_nolen (sv)); 345 croak ("illegal signal number or name: %s", SvPV_nolen (sv));
345 346
347static void
346EV_INLINE default_fork (void) 348default_fork (void)
347{ 349{
348 ev_loop_fork (EV_DEFAULT_UC); 350 ev_loop_fork (EV_DEFAULT_UC);
349} 351}
350 352
351///////////////////////////////////////////////////////////////////////////// 353/////////////////////////////////////////////////////////////////////////////
757 ev_stat_set (RETVAL, SvPVbyte_nolen (e_fh (RETVAL)), interval); 759 ev_stat_set (RETVAL, SvPVbyte_nolen (e_fh (RETVAL)), interval);
758 if (!ix) START (stat, RETVAL); 760 if (!ix) START (stat, RETVAL);
759 OUTPUT: 761 OUTPUT:
760 RETVAL 762 RETVAL
761 763
764#ifndef EV_NO_LOOPS
765
762ev_embed *embed (struct ev_loop *loop, SV *cb = 0) 766ev_embed *embed (struct ev_loop *loop, SV *cb = 0)
763 ALIAS: 767 ALIAS:
764 embed_ns = 1 768 embed_ns = 1
765 CODE: 769 CODE:
766{ 770{
772 ev_embed_set (RETVAL, loop); 776 ev_embed_set (RETVAL, loop);
773 if (!ix) START (embed, RETVAL); 777 if (!ix) START (embed, RETVAL);
774} 778}
775 OUTPUT: 779 OUTPUT:
776 RETVAL 780 RETVAL
781
782#endif
777 783
778ev_async *async (SV *cb) 784ev_async *async (SV *cb)
779 ALIAS: 785 ALIAS:
780 async_ns = 1 786 async_ns = 1
781 CODE: 787 CODE:
1324 CODE: 1330 CODE:
1325 RETVAL = boolSV (ev_async_pending (w)); 1331 RETVAL = boolSV (ev_async_pending (w));
1326 OUTPUT: 1332 OUTPUT:
1327 RETVAL 1333 RETVAL
1328 1334
1335#ifndef EV_NO_LOOPS
1336
1329MODULE = EV PACKAGE = EV::Loop PREFIX = ev_ 1337MODULE = EV PACKAGE = EV::Loop PREFIX = ev_
1330 1338
1331SV *new (SV *klass, unsigned int flags = 0) 1339SV *new (SV *klass, unsigned int flags = 0)
1332 CODE: 1340 CODE:
1333{ 1341{
1572 SvOK (timeout) ? SvNV (timeout) : -1., 1580 SvOK (timeout) ? SvNV (timeout) : -1.,
1573 e_once_cb, 1581 e_once_cb,
1574 newSVsv (cb) 1582 newSVsv (cb)
1575 ); 1583 );
1576 1584
1585#endif
1586

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines