X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=mg.h;h=e99b52cb6d6af5dcc639c74d9db29d033cada10d;hb=34073cabb53a557532d5a01f749b64f7e241d789;hp=6a8afdc13bc6e11e87b76c4663f5dcbda357f00b;hpb=cea2e8a9dd23747fd2b66edc86c58c64e9970321;p=p5sagit%2Fp5-mst-13.2.git diff --git a/mg.h b/mg.h index 6a8afdc..e99b52c 100644 --- a/mg.h +++ b/mg.h @@ -1,6 +1,6 @@ /* mg.h * - * Copyright (c) 1991-1999, Larry Wall + * Copyright (c) 1991-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. @@ -16,6 +16,9 @@ struct mgvtbl { U32 (CPERLscope(*svt_len)) (pTHX_ SV *sv, MAGIC* mg); int (CPERLscope(*svt_clear))(pTHX_ SV *sv, MAGIC* mg); int (CPERLscope(*svt_free)) (pTHX_ SV *sv, MAGIC* mg); + int (CPERLscope(*svt_copy)) (pTHX_ SV *sv, MAGIC* mg, + SV *nsv, const char *name, int namlen); + int (CPERLscope(*svt_dup)) (pTHX_ MAGIC *mg, CLONE_PARAMS *param); }; #endif @@ -33,6 +36,8 @@ struct magic { #define MGf_TAINTEDDIR 1 #define MGf_REFCOUNTED 2 #define MGf_GSKIP 4 +#define MGf_COPY 8 +#define MGf_DUP 16 #define MGf_MINMATCH 1 @@ -40,7 +45,7 @@ struct magic { #define MgTAINTEDDIR_on(mg) (mg->mg_flags |= MGf_TAINTEDDIR) #define MgTAINTEDDIR_off(mg) (mg->mg_flags &= ~MGf_TAINTEDDIR) -#define MgPV(mg,lp) (((lp = (mg)->mg_len) == HEf_SVKEY) ? \ +#define MgPV(mg,lp) ((((int)(lp = (mg)->mg_len)) == HEf_SVKEY) ? \ SvPV((SV*)((mg)->mg_ptr),lp) : \ (mg)->mg_ptr)