X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=gv.h;h=428ab770b1c1671d3053926fed48382e1a15ffe1;hb=e930465f0bda9d63d97d7bcbea42ed0d09f68de3;hp=f00331aed017f2dc7e6c71b609f2ae0782dafe05;hpb=1d7c184104c076988718a01b77c8706aae05b092;p=p5sagit%2Fp5-mst-13.2.git diff --git a/gv.h b/gv.h index f00331a..428ab77 100644 --- a/gv.h +++ b/gv.h @@ -1,6 +1,6 @@ /* gv.h * - * Copyright (c) 1991-1999, 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. @@ -34,6 +34,14 @@ struct gp { #define GvSTASH(gv) (GvXPVGV(gv)->xgv_stash) #define GvFLAGS(gv) (GvXPVGV(gv)->xgv_flags) +/* +=for apidoc Am|SV*|GvSV|GV* gv + +Return the SV from the GV. + +=cut +*/ + #define GvSV(gv) (GvGP(gv)->gp_sv) #define GvREFCNT(gv) (GvGP(gv)->gp_refcnt) #define GvIO(gv) ((gv) && SvTYPE((SV*)gv) == SVt_PVGV ? GvIOp(gv) : 0) @@ -123,6 +131,19 @@ HV *GvHVn(); #define GvIN_PAD_on(gv) (GvFLAGS(gv) |= GVf_IN_PAD) #define GvIN_PAD_off(gv) (GvFLAGS(gv) &= ~GVf_IN_PAD) +/* XXX: all GvFLAGS options are used, borrowing GvGPFLAGS for the moment */ + +#define GVf_UNIQUE 0x0001 +#define GvUNIQUE(gv) (GvGP(gv) && (GvGPFLAGS(gv) & GVf_UNIQUE)) +#define GvUNIQUE_on(gv) (GvGPFLAGS(gv) |= GVf_UNIQUE) +#define GvUNIQUE_off(gv) (GvGPFLAGS(gv) &= ~GVf_UNIQUE) + +#ifdef USE_ITHREADS +#define GV_UNIQUE_CHECK +#else +#undef GV_UNIQUE_CHECK +#endif + #define Nullgv Null(GV*) #define DM_UID 0x003 @@ -141,4 +162,3 @@ HV *GvHVn(); #define GV_ADDWARN 0x04 /* add, but warn if symbol wasn't already there */ #define GV_ADDINEVAL 0x08 /* add, as though we're doing so within an eval */ #define GV_NOINIT 0x10 /* add, but don't init symbol, if type != PVGV */ -#define GV_ADDOUR 0x20 /* add "our" variable */