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

Comparing Coro/Coro/State.xs (file contents):
Revision 1.370 by root, Thu Aug 20 21:38:51 2009 UTC vs.
Revision 1.372 by root, Thu Oct 1 23:50:23 2009 UTC

289static OP *(*coro_old_pp_sselect) (pTHX); 289static OP *(*coro_old_pp_sselect) (pTHX);
290static SV *coro_select_select; 290static SV *coro_select_select;
291 291
292/* horrible hack, but if it works... */ 292/* horrible hack, but if it works... */
293static OP * 293static OP *
294coro_pp_sselect (aTHX) 294coro_pp_sselect (pTHX)
295{ 295{
296 dSP; 296 dSP;
297 PUSHMARK (SP - 4); /* fake argument list */ 297 PUSHMARK (SP - 4); /* fake argument list */
298 XPUSHs (coro_select_select); 298 XPUSHs (coro_select_select);
299 PUTBACK; 299 PUTBACK;
1760 api_ready (aTHX_ SvRV (sv_idle)); 1760 api_ready (aTHX_ SvRV (sv_idle));
1761 --coro_nready; 1761 --coro_nready;
1762 } 1762 }
1763 else 1763 else
1764 { 1764 {
1765 /* TODO: deprecated, remove, cannot work reliably *//*D*/
1765 dSP; 1766 dSP;
1766 1767
1767 ENTER; 1768 ENTER;
1768 SAVETMPS; 1769 SAVETMPS;
1769 1770
2330 if (PL_op->op_ppaddr != PL_ppaddr [OP_ENTERSUB] 2331 if (PL_op->op_ppaddr != PL_ppaddr [OP_ENTERSUB]
2331 && PL_op->op_ppaddr != pp_slf) 2332 && PL_op->op_ppaddr != pp_slf)
2332 croak ("FATAL: Coro SLF calls can only be made normally, not via goto or any other means, caught"); 2333 croak ("FATAL: Coro SLF calls can only be made normally, not via goto or any other means, caught");
2333 2334
2334 CvFLAGS (cv) |= CVf_SLF; 2335 CvFLAGS (cv) |= CVf_SLF;
2336 CvNODEBUG_on (cv);
2335 CvXSUBANY (cv).any_ptr = (void *)init_cb; 2337 CvXSUBANY (cv).any_ptr = (void *)init_cb;
2336 slf_cv = cv; 2338 slf_cv = cv;
2337 2339
2338 /* we patch the op, and then re-run the whole call */ 2340 /* we patch the op, and then re-run the whole call */
2339 /* we have to put the same argument on the stack for this to work */ 2341 /* we have to put the same argument on the stack for this to work */
3365SV * 3367SV *
3366async (...) 3368async (...)
3367 PROTOTYPE: &@ 3369 PROTOTYPE: &@
3368 CODE: 3370 CODE:
3369 RETVAL = coro_new (aTHX_ coro_stash, &ST (0), items, 1); 3371 RETVAL = coro_new (aTHX_ coro_stash, &ST (0), items, 1);
3370 api_ready (RETVAL); 3372 api_ready (aTHX_ RETVAL);
3371 OUTPUT: 3373 OUTPUT:
3372 RETVAL 3374 RETVAL
3373 3375
3374void 3376void
3375terminate (...) 3377terminate (...)

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines