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.244 by root, Sun Sep 21 18:29:39 2008 UTC vs.
Revision 1.245 by root, Mon Sep 22 05:40:21 2008 UTC

361 361
362 /* casting is fun. */ 362 /* casting is fun. */
363 while (&PL_sv_undef != (SV *)(padlist = (AV *)av_pop (av))) 363 while (&PL_sv_undef != (SV *)(padlist = (AV *)av_pop (av)))
364 free_padlist (aTHX_ padlist); 364 free_padlist (aTHX_ padlist);
365 365
366 SvREFCNT_dec (av); 366 SvREFCNT_dec (av); /* sv_magicext increased the refcount */
367 367
368 return 0; 368 return 0;
369} 369}
370 370
371#define CORO_MAGIC_type_cv PERL_MAGIC_ext 371#define CORO_MAGIC_type_cv PERL_MAGIC_ext
666 #undef VAR 666 #undef VAR
667 } 667 }
668 else 668 else
669 slot = coro->slot; 669 slot = coro->slot;
670 670
671 if (slot)
672 {
671 rss += sizeof (slot->curstackinfo); 673 rss += sizeof (slot->curstackinfo);
672 rss += (slot->curstackinfo->si_cxmax + 1) * sizeof (PERL_CONTEXT); 674 rss += (slot->curstackinfo->si_cxmax + 1) * sizeof (PERL_CONTEXT);
673 rss += sizeof (SV) + sizeof (struct xpvav) + (1 + AvMAX (slot->curstack)) * sizeof (SV *); 675 rss += sizeof (SV) + sizeof (struct xpvav) + (1 + AvMAX (slot->curstack)) * sizeof (SV *);
674 rss += slot->tmps_max * sizeof (SV *); 676 rss += slot->tmps_max * sizeof (SV *);
675 rss += (slot->markstack_max - slot->markstack_ptr) * sizeof (I32); 677 rss += (slot->markstack_max - slot->markstack_ptr) * sizeof (I32);
676 rss += slot->scopestack_max * sizeof (I32); 678 rss += slot->scopestack_max * sizeof (I32);
677 rss += slot->savestack_max * sizeof (ANY); 679 rss += slot->savestack_max * sizeof (ANY);
678 680
679#if !PERL_VERSION_ATLEAST (5,10,0) 681#if !PERL_VERSION_ATLEAST (5,10,0)
680 rss += slot->retstack_max * sizeof (OP *); 682 rss += slot->retstack_max * sizeof (OP *);
681#endif 683#endif
684 }
682 } 685 }
683 686
684 return rss; 687 return rss;
685} 688}
686 689
1817call (Coro::State coro, SV *coderef) 1820call (Coro::State coro, SV *coderef)
1818 ALIAS: 1821 ALIAS:
1819 eval = 1 1822 eval = 1
1820 CODE: 1823 CODE:
1821{ 1824{
1822 if (coro->mainstack) 1825 if (coro->mainstack && ((coro->flags & CF_RUNNING) || coro->slot))
1823 { 1826 {
1824 struct coro temp; 1827 struct coro temp;
1825 1828
1826 if (!(coro->flags & CF_RUNNING)) 1829 if (!(coro->flags & CF_RUNNING))
1827 { 1830 {

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines