--- Coro/Coro/State.xs 2003/05/27 01:15:31 1.45 +++ Coro/Coro/State.xs 2003/11/05 20:02:46 1.46 @@ -2,6 +2,29 @@ #include "perl.h" #include "XSUB.h" +#include "patchlevel.h" + +#if PATCHLEVEL < 6 +# ifndef PL_ppaddr +# define PL_ppaddr ppaddr +# endif +# ifndef call_sv +# define call_sv perl_call_sv +# endif +# ifndef get_sv +# define get_sv perl_get_sv +# endif +# ifndef get_cv +# define get_cv perl_get_cv +# endif +# ifndef IS_PADGV +# define IS_PADGV(v) 0 +# endif +# ifndef IS_PADCONST +# define IS_PADCONST(v) 0 +# endif +#endif + #include "libcoro/coro.c" #include @@ -394,12 +417,14 @@ get_padlist (cv); /* this is a monster */ } } +#ifdef CXt_FORMAT else if (CxTYPE(cx) == CXt_FORMAT) { /* I never used formats, so how should I know how these are implemented? */ /* my bold guess is as a simple, plain sub... */ croak ("CXt_FORMAT not yet handled. Don't switch coroutines from within formats"); } +#endif } if (top_si->si_type == PERLSI_MAIN) @@ -476,7 +501,9 @@ PL_markstack_ptr = PL_markstack; PL_markstack_max = PL_markstack + 16; +#ifdef SET_MARK_OFFSET SET_MARK_OFFSET; +#endif New(54,PL_scopestack,16,I32); PL_scopestack_ix = 0; @@ -1016,7 +1043,7 @@ struct coro *prev, *next; if (!returnstk) - returnstk = SvRV (get_sv ("Coro::Cont::return", FALSE)); + returnstk = SvRV ((SV *)get_sv ("Coro::Cont::return", FALSE)); /* set up @_ -- ugly */ av_clear (defav);