X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=cv.h;h=b6fd7e82d4d51c4f1cbbe9de4bf65668c5a96f38;hb=2d84a16a79dbb993063e4052e2e5e7a2dca5effc;hp=6fa1f4fe8d69a663ff6b0eba09b03c0ee876ceb2;hpb=beab0874143b7208922720fecefc4a224011fa25;p=p5sagit%2Fp5-mst-13.2.git diff --git a/cv.h b/cv.h index 6fa1f4f..b6fd7e8 100644 --- a/cv.h +++ b/cv.h @@ -1,6 +1,6 @@ /* cv.h * - * Copyright (c) 1991-2000, Larry Wall + * Copyright (c) 1991-2001, Larry Wall * * You may distribute under the terms of either the GNU General Public * License or the Artistic License, as specified in the README file. @@ -22,17 +22,17 @@ struct xpvcv { HV * xcv_stash; OP * xcv_start; OP * xcv_root; - void (*xcv_xsub) (pTHXo_ CV*); + void (*xcv_xsub) (pTHX_ CV*); ANY xcv_xsubany; GV * xcv_gv; char * xcv_file; long xcv_depth; /* >= 2 indicates recursive call */ AV * xcv_padlist; CV * xcv_outside; -#ifdef USE_THREADS +#ifdef USE_5005THREADS perl_mutex *xcv_mutexp; struct perl_thread *xcv_owner; /* current owner thread */ -#endif /* USE_THREADS */ +#endif /* USE_5005THREADS */ cv_flags_t xcv_flags; }; @@ -55,14 +55,19 @@ Returns the stash of the CV. #define CvXSUBANY(sv) ((XPVCV*)SvANY(sv))->xcv_xsubany #define CvGV(sv) ((XPVCV*)SvANY(sv))->xcv_gv #define CvFILE(sv) ((XPVCV*)SvANY(sv))->xcv_file +#ifdef USE_ITHREADS +# define CvFILE_set_from_cop(sv, cop) (CvFILE(sv) = savepv(CopFILE(cop))) +#else +# define CvFILE_set_from_cop(sv, cop) (CvFILE(sv) = CopFILE(cop)) +#endif #define CvFILEGV(sv) (gv_fetchfile(CvFILE(sv)) #define CvDEPTH(sv) ((XPVCV*)SvANY(sv))->xcv_depth #define CvPADLIST(sv) ((XPVCV*)SvANY(sv))->xcv_padlist #define CvOUTSIDE(sv) ((XPVCV*)SvANY(sv))->xcv_outside -#ifdef USE_THREADS +#ifdef USE_5005THREADS #define CvMUTEXP(sv) ((XPVCV*)SvANY(sv))->xcv_mutexp #define CvOWNER(sv) ((XPVCV*)SvANY(sv))->xcv_owner -#endif /* USE_THREADS */ +#endif /* USE_5005THREADS */ #define CvFLAGS(sv) ((XPVCV*)SvANY(sv))->xcv_flags #define CVf_CLONE 0x0001 /* anon CV uses external lexicals */