X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=scope.h;h=6cfe1247e01c5a2aeca6eeef730333682a0d9c1a;hb=d6376244c2261025775e8b11a6a64d7c9e0d1612;hp=0ceb6ba912900ad756645b720856a2e87c0b757f;hpb=1b266415f383a85c93346bb15a7bdcac7f62eb77;p=p5sagit%2Fp5-mst-13.2.git diff --git a/scope.h b/scope.h index 0ceb6ba..6cfe124 100644 --- a/scope.h +++ b/scope.h @@ -1,3 +1,12 @@ +/* scope.h + * + * Copyright (c) 1997-2002, 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. + * + */ + #define SAVEt_ITEM 0 #define SAVEt_SV 1 #define SAVEt_AV 2 @@ -34,6 +43,8 @@ #define SAVEt_COMPPAD 33 #define SAVEt_GENERIC_PVREF 34 #define SAVEt_PADSV 35 +#define SAVEt_MORTALIZESV 36 +#define SAVEt_SHARED_PVREF 37 #ifndef SCOPE_SAVES_SIGNAL_MASK #define SCOPE_SAVES_SIGNAL_MASK 0 @@ -54,6 +65,8 @@ #define SSPOPDXPTR (PL_savestack[--PL_savestack_ix].any_dxptr) /* +=head1 Callback Functions + =for apidoc Ams||SAVETMPS Opening bracket for temporaries on a callback. See C and L. @@ -108,11 +121,13 @@ Closing bracket on a callback. See C and L. #define SAVEVPTR(s) save_vptr((void*)&(s)) #define SAVEPADSV(s) save_padsv(s) #define SAVEFREESV(s) save_freesv((SV*)(s)) +#define SAVEMORTALIZESV(s) save_mortalizesv((SV*)(s)) #define SAVEFREEOP(o) save_freeop(SOFT_CAST(OP*)(o)) #define SAVEFREEPV(p) save_freepv(SOFT_CAST(char*)(p)) #define SAVECLEARSV(sv) save_clearsv(SOFT_CAST(SV**)&(sv)) #define SAVEGENERICSV(s) save_generic_svref((SV**)&(s)) #define SAVEGENERICPV(s) save_generic_pvref((char**)&(s)) +#define SAVESHAREDPV(s) save_shared_pvref((char**)&(s)) #define SAVEDELETE(h,k,l) \ save_delete(SOFT_CAST(HV*)(h), SOFT_CAST(char*)(k), (I32)(l)) #define SAVEDESTRUCTOR(f,p) \ @@ -156,9 +171,9 @@ Closing bracket on a callback. See C and L. #ifdef USE_ITHREADS # define SAVECOPSTASH(c) SAVEPPTR(CopSTASHPV(c)) -# define SAVECOPSTASH_FREE(c) SAVEGENERICPV(CopSTASHPV(c)) +# define SAVECOPSTASH_FREE(c) SAVESHAREDPV(CopSTASHPV(c)) # define SAVECOPFILE(c) SAVEPPTR(CopFILE(c)) -# define SAVECOPFILE_FREE(c) SAVEGENERICPV(CopFILE(c)) +# define SAVECOPFILE_FREE(c) SAVESHAREDPV(CopFILE(c)) #else # define SAVECOPSTASH(c) SAVESPTR(CopSTASH(c)) # define SAVECOPSTASH_FREE(c) SAVECOPSTASH(c) /* XXX not refcounted */