X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=cv.h;h=8e7cad681f49687e0b67bea1818bc04c5e617f49;hb=9615f2eee7daabb211e5274ef9d9389a58bd4e0c;hp=4ade5086716f8ac90475e83a2a7e3f592ccc8411;hpb=bc89e66f06f2a92e37ea7c110f66788fcfbe6847;p=p5sagit%2Fp5-mst-13.2.git diff --git a/cv.h b/cv.h index 4ade508..8e7cad6 100644 --- a/cv.h +++ b/cv.h @@ -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 -#define CvFILEGV(sv) (gv_fetchfile(CvFILE(sv)) +#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 */