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.148 by root, Fri Apr 13 12:56:55 2007 UTC vs.
Revision 1.149 by root, Sat Apr 14 15:06:05 2007 UTC

567 Zero (&myop, 1, LOGOP); 567 Zero (&myop, 1, LOGOP);
568 myop.op_next = Nullop; 568 myop.op_next = Nullop;
569 myop.op_flags = OPf_WANT_VOID; 569 myop.op_flags = OPf_WANT_VOID;
570 570
571 PUSHMARK (SP); 571 PUSHMARK (SP);
572 XPUSHs ((SV *)get_cv ("Coro::State::_coro_init", FALSE)); 572 XPUSHs (av_shift (GvAV (PL_defgv)));
573 PUTBACK; 573 PUTBACK;
574 PL_op = (OP *)&myop; 574 PL_op = (OP *)&myop;
575 PL_op = PL_ppaddr[OP_ENTERSUB](aTHX); 575 PL_op = PL_ppaddr[OP_ENTERSUB](aTHX);
576 SPAGAIN; 576 SPAGAIN;
577 } 577 }
630 630
631 /* somebody or something will hit me for both perl_run and PL_restartop */ 631 /* somebody or something will hit me for both perl_run and PL_restartop */
632 PL_restartop = PL_op; 632 PL_restartop = PL_op;
633 perl_run (PL_curinterp); 633 perl_run (PL_curinterp);
634 634
635 /*
635 /* If perl-run returns we assume exit() was being called, which */ 636 * If perl-run returns we assume exit() was being called or the coro
636 /* seems to be the only valid (non-bug) reason for perl_run to return. */ 637 * fell off the end, which seems to be the only valid (non-bug)
637 /* We try to exit by jumping to the bootstrap-time "top" top_env, as */ 638 * reason for perl_run to return. We try to exit by jumping to the
638 /* we cannot restore the "main" coroutine as Coro has no such concept */ 639 * bootstrap-time "top" top_env, as we cannot restore the "main"
640 * coroutine as Coro has no such concept
641 */
639 PL_top_env = main_top_env; 642 PL_top_env = main_top_env;
640 JMPENV_JUMP (2); /* I do not feel well about the hardcoded 2 at all */ 643 JMPENV_JUMP (2); /* I do not feel well about the hardcoded 2 at all */
641} 644}
642 645
643static coro_cctx * 646static coro_cctx *

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines