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.207 by root, Tue Oct 9 22:29:27 2007 UTC vs.
Revision 1.208 by root, Wed Oct 10 00:53:18 2007 UTC

1570 Coro::Event::next = 5 1570 Coro::Event::next = 5
1571 Coro::Event::next_cancel = 6 1571 Coro::Event::next_cancel = 6
1572 PPCODE: 1572 PPCODE:
1573{ 1573{
1574 struct transfer_args ta; 1574 struct transfer_args ta;
1575 int repeat = 0; 1575 int again = 0;
1576 1576
1577 do 1577 do
1578 { 1578 {
1579 switch (ix) 1579 switch (ix)
1580 { 1580 {
1623 XSRETURN_EMPTY; 1623 XSRETURN_EMPTY;
1624 } 1624 }
1625 } 1625 }
1626 1626
1627 prepare_schedule (aTHX_ &ta); 1627 prepare_schedule (aTHX_ &ta);
1628 repeat = 1; 1628 again = 1;
1629 break; 1629 break;
1630 } 1630 }
1631 1631
1632 BARRIER; 1632 BARRIER;
1633 TRANSFER (ta); 1633 TRANSFER (ta);
1634 BARRIER; 1634 BARRIER;
1635 } 1635 }
1636 while (repeat); 1636 while (again);
1637 1637
1638 if (expect_false (GIMME_V != G_VOID && ta.next != ta.prev)) 1638 if (expect_false (GIMME_V != G_VOID && ta.next != ta.prev))
1639 XSRETURN_YES; 1639 XSRETURN_YES;
1640} 1640
1641 XSRETURN_EMPTY; /* not understood why this is necessary, likely some stack handling bug */
1641 1642
1642bool 1643bool
1643_destroy (SV *coro_sv) 1644_destroy (SV *coro_sv)
1644 CODE: 1645 CODE:
1645 RETVAL = coro_state_destroy (aTHX_ SvSTATE (coro_sv)); 1646 RETVAL = coro_state_destroy (aTHX_ SvSTATE (coro_sv));
1704 1705
1705 { 1706 {
1706 dSP; 1707 dSP;
1707 ENTER; 1708 ENTER;
1708 SAVETMPS; 1709 SAVETMPS;
1710 PUTBACK;
1711 PUSHSTACK;
1709 PUSHMARK (SP); 1712 PUSHMARK (SP);
1710 PUTBACK;
1711 1713
1712 if (ix) 1714 if (ix)
1713 eval_sv (coderef, 0); 1715 eval_sv (coderef, 0);
1714 else 1716 else
1715 call_sv (coderef, G_KEEPERR | G_EVAL | G_VOID | G_DISCARD); 1717 call_sv (coderef, G_KEEPERR | G_EVAL | G_VOID | G_DISCARD);
1716 1718
1717 SPAGAIN; 1719 POPSTACK;
1718 FREETMPS; 1720 FREETMPS;
1719 LEAVE; 1721 LEAVE;
1720 PUTBACK;
1721 } 1722 }
1722 1723
1723 if (!(coro->flags & CF_RUNNING)) 1724 if (!(coro->flags & CF_RUNNING))
1724 { 1725 {
1725 save_perl (aTHX_ coro); 1726 save_perl (aTHX_ coro);

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines