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.41 by root, Sun Oct 4 13:07:56 2015 UTC vs.
Revision 1.42 by root, Fri Oct 16 08:11:19 2015 UTC

198} 198}
199 199
200static int 200static int
201slf_check_rw (pTHX_ struct CoroSLF *frame) 201slf_check_rw (pTHX_ struct CoroSLF *frame)
202{ 202{
203 SV *data = (SV *)frame->data; 203 coro_dir *dir = (coro_dir *)frame->data;
204 204
205 /* return early when an exception is pending */ 205 /* return early when an exception is pending */
206 if (CORO_THROW) 206 if (CORO_THROW)
207 {
208 ev_io_stop (EV_DEFAULT_UC, &dir->io);
209 ev_timer_stop (EV_DEFAULT_UC, &dir->tw);
210
207 return 0; 211 return 0;
212 }
208 213
209 if (SvROK (data)) 214 if (SvROK (dir->data))
210 return 1; 215 return 1;
211 else 216 else
212 { 217 {
213 dSP; 218 dSP;
214 219
215 XPUSHs (data); 220 XPUSHs (dir->data);
216 221
217 PUTBACK; 222 PUTBACK;
218 return 0; 223 return 0;
219 } 224 }
220} 225}
265 } 270 }
266 } 271 }
267 272
268 ev_io_start (EV_DEFAULT_UC, &dir->io); 273 ev_io_start (EV_DEFAULT_UC, &dir->io);
269 274
270 frame->data = (void *)dir->data; 275 frame->data = (void *)dir;
271 frame->prepare = GCoroAPI->prepare_schedule; 276 frame->prepare = GCoroAPI->prepare_schedule;
272 frame->check = slf_check_rw; 277 frame->check = slf_check_rw;
273} 278}
274 279
275static void 280static void

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines