--- Coro/Coro/State.xs 2008/01/20 10:22:07 1.222 +++ Coro/Coro/State.xs 2008/02/13 15:46:00 1.223 @@ -74,11 +74,6 @@ # endif #endif -/* 5.8.7 */ -#ifndef SvRV_set -# define SvRV_set(s,v) SvRV(s) = (v) -#endif - /* 5.8.8 */ #ifndef GV_NOTQUAL # define GV_NOTQUAL 0 @@ -87,6 +82,16 @@ # define newSV(l) NEWSV(0,l) #endif +/* 5.11 */ +#ifndef CxHASARGS +# define CxHASARGS(cx) (cx)->blk_sub.hasargs +#endif + +/* 5.8.7 */ +#ifndef SvRV_set +# define SvRV_set(s,v) SvRV(s) = (v) +#endif + #if !__i386 && !__x86_64 && !__powerpc && !__m68k && !__alpha && !__mips && !__sparc64 # undef CORO_STACKGUARD #endif @@ -897,7 +902,7 @@ PUSHMARK (SP); PUSHs (&PL_sv_yes); PUSHs (fullname); - PUSHs (cx->blk_sub.hasargs ? sv_2mortal (newRV_inc ((SV *)cx->blk_sub.argarray)) : &PL_sv_undef); + PUSHs (CxHASARGS (cx) ? sv_2mortal (newRV_inc ((SV *)cx->blk_sub.argarray)) : &PL_sv_undef); PUTBACK; cb = hv_fetch ((HV *)SvRV (coro_current), "_trace_sub_cb", sizeof ("_trace_sub_cb") - 1, 0); if (cb) call_sv (*cb, G_KEEPERR | G_EVAL | G_VOID | G_DISCARD);