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

Comparing Coro/EV/EV.xs (file contents):
Revision 1.21 by root, Sun Nov 16 08:59:16 2008 UTC vs.
Revision 1.22 by root, Tue Nov 18 11:04:42 2008 UTC

65{ 65{
66 SV *data = (SV *)arg; 66 SV *data = (SV *)arg;
67 67
68 CORO_READY (data); 68 CORO_READY (data);
69 sv_setiv (data, revents); 69 sv_setiv (data, revents);
70 SvREFCNT_dec (data);
70} 71}
71 72
72static int 73static int
73slf_check_once (pTHX_ struct CoroSLF *frame) 74slf_check_once (pTHX_ struct CoroSLF *frame)
74{ 75{
75 SV *data = (SV *)frame->data; 76 SV *data = (SV *)frame->data;
77
78 /* return early when an exception is pending */
79 if (CORO_THROW)
80 return 0;
76 81
77 if (SvROK (data)) 82 if (SvROK (data))
78 return 1; /* repeat until we have been signalled */ 83 return 1; /* repeat until we have been signalled */
79 else 84 else
80 { 85 {
104 EV_DEFAULT_UC, 109 EV_DEFAULT_UC,
105 sv_fileno (arg [0]), 110 sv_fileno (arg [0]),
106 SvIV (arg [1]), 111 SvIV (arg [1]),
107 items >= 3 && SvOK (arg [2]) ? SvNV (arg [2]) : -1., 112 items >= 3 && SvOK (arg [2]) ? SvNV (arg [2]) : -1.,
108 once_cb, 113 once_cb,
109 data 114 SvREFCNT_inc (data)
110 ); 115 );
111} 116}
112 117
113static void 118static void
114slf_init_timer (pTHX_ struct CoroSLF *frame, CV *cv, SV **arg, int items) 119slf_init_timer (pTHX_ struct CoroSLF *frame, CV *cv, SV **arg, int items)
130 EV_DEFAULT_UC, 135 EV_DEFAULT_UC,
131 -1, 136 -1,
132 0, 137 0,
133 after >= 0. ? after : 0., 138 after >= 0. ? after : 0.,
134 once_cb, 139 once_cb,
135 data 140 SvREFCNT_inc (data)
136 ); 141 );
137} 142}
138 143
139/*****************************************************************************/ 144/*****************************************************************************/
140 145

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines