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.304 by root, Wed Nov 19 08:22:48 2008 UTC vs.
Revision 1.305 by root, Wed Nov 19 10:44:41 2008 UTC

449 else 449 else
450 { 450 {
451#if CORO_PREFER_PERL_FUNCTIONS 451#if CORO_PREFER_PERL_FUNCTIONS
452 /* this is probably cleaner? but also slower! */ 452 /* this is probably cleaner? but also slower! */
453 /* in practise, it seems to be less stable */ 453 /* in practise, it seems to be less stable */
454 CV *cp = Perl_cv_clone (cv); 454 CV *cp = Perl_cv_clone (aTHX_ cv);
455 CvPADLIST (cv) = CvPADLIST (cp); 455 CvPADLIST (cv) = CvPADLIST (cp);
456 CvPADLIST (cp) = 0; 456 CvPADLIST (cp) = 0;
457 SvREFCNT_dec (cp); 457 SvREFCNT_dec (cp);
458#else 458#else
459 CvPADLIST (cv) = coro_clone_padlist (aTHX_ cv); 459 CvPADLIST (cv) = coro_clone_padlist (aTHX_ cv);
603 * of perl.c:init_stacks, except that it uses less memory 603 * of perl.c:init_stacks, except that it uses less memory
604 * on the (sometimes correct) assumption that coroutines do 604 * on the (sometimes correct) assumption that coroutines do
605 * not usually need a lot of stackspace. 605 * not usually need a lot of stackspace.
606 */ 606 */
607#if CORO_PREFER_PERL_FUNCTIONS 607#if CORO_PREFER_PERL_FUNCTIONS
608# define coro_init_stacks init_stacks 608# define coro_init_stacks(thx) init_stacks ()
609#else 609#else
610static void 610static void
611coro_init_stacks (pTHX) 611coro_init_stacks (pTHX)
612{ 612{
613 PL_curstackinfo = new_stackinfo(32, 8); 613 PL_curstackinfo = new_stackinfo(32, 8);
2143 SV **ary; 2143 SV **ary;
2144 2144
2145 /* unfortunately, building manually saves memory */ 2145 /* unfortunately, building manually saves memory */
2146 Newx (ary, 2, SV *); 2146 Newx (ary, 2, SV *);
2147 AvALLOC (av) = ary; 2147 AvALLOC (av) = ary;
2148 /*AvARRAY (av) = ary;*/
2148 SvPV_set ((SV *)av, (char *)ary); /* 5.8.8 needs this syntax instead of AvARRAY = ary */ 2149 SvPVX ((SV *)av) = (char *)ary; /* 5.8.8 needs this syntax instead of AvARRAY = ary */
2149 AvMAX (av) = 1; 2150 AvMAX (av) = 1;
2150 AvFILLp (av) = 0; 2151 AvFILLp (av) = 0;
2151 ary [0] = newSViv (count); 2152 ary [0] = newSViv (count);
2152 2153
2153 return newRV_noinc ((SV *)av); 2154 return newRV_noinc ((SV *)av);

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines