… | |
… | |
289 | static OP *(*coro_old_pp_sselect) (pTHX); |
289 | static OP *(*coro_old_pp_sselect) (pTHX); |
290 | static SV *coro_select_select; |
290 | static SV *coro_select_select; |
291 | |
291 | |
292 | /* horrible hack, but if it works... */ |
292 | /* horrible hack, but if it works... */ |
293 | static OP * |
293 | static OP * |
294 | coro_pp_sselect (aTHX) |
294 | coro_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 */ |
… | |
… | |
3365 | SV * |
3367 | SV * |
3366 | async (...) |
3368 | async (...) |
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 | |
3374 | void |
3376 | void |
3375 | terminate (...) |
3377 | terminate (...) |