X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=gv.h;h=2edc9b9488572e056b0908a02de2e48745ff3f7e;hb=5284b67eb2f74db7dcaf6c897d9c70d6f197e486;hp=07a04b67cb6f02ed68d93d0b0f67791313ab1e72;hpb=0e06870bf080a38cda51c06c6612359afc2334e1;p=p5sagit%2Fp5-mst-13.2.git diff --git a/gv.h b/gv.h index 07a04b6..2edc9b9 100644 --- a/gv.h +++ b/gv.h @@ -1,6 +1,6 @@ /* gv.h * - * Copyright (c) 1991-2001, 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. @@ -35,6 +35,8 @@ struct gp { #define GvFLAGS(gv) (GvXPVGV(gv)->xgv_flags) /* +=head1 GV Functions + =for apidoc Am|SV*|GvSV|GV* gv Return the SV from the GV. @@ -131,6 +133,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