X-Git-Url: https://perl5.git.perl.org/perl5.git/blobdiff_plain/5be41be4072fd5cea66cae4e0e2cdfd32753ce89..3d4dd4c7b4cdb5c308fe0b83e0f6354a2eb9db12:/gv.h diff --git a/gv.h b/gv.h index 61af704..16aa058 100644 --- a/gv.h +++ b/gv.h @@ -1,7 +1,7 @@ /* gv.h * * Copyright (C) 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, - * 2000, 2001, 2002, 2003, 2004, 2005, 2006, by Larry Wall and others + * 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, by Larry Wall and others * * You may distribute under the terms of either the GNU General Public * License or the Artistic License, as specified in the README file. @@ -10,14 +10,14 @@ struct gp { SV * gp_sv; /* scalar value */ - U32 gp_refcnt; /* how many globs point to this? */ struct io * gp_io; /* filehandle value */ - CV * gp_form; /* format value */ - AV * gp_av; /* array value */ - HV * gp_hv; /* hash value */ - GV * gp_egv; /* effective gv, if *glob */ CV * gp_cv; /* subroutine value */ U32 gp_cvgen; /* generational validity of cached gv_cv */ + U32 gp_refcnt; /* how many globs point to this? */ + HV * gp_hv; /* hash value */ + AV * gp_av; /* array value */ + CV * gp_form; /* format value */ + GV * gp_egv; /* effective gv, if *glob */ line_t gp_line; /* line first declared at (for -w) */ HEK * gp_file_hek; /* file first declared in (for -w) */ }; @@ -88,7 +88,7 @@ Return the SV from the GV. #endif #define GvREFCNT(gv) (GvGP(gv)->gp_refcnt) -#define GvIO(gv) ((gv) && SvTYPE((SV*)gv) == SVt_PVGV && GvGP(gv) ? GvIOp(gv) : 0) +#define GvIO(gv) ((gv) && SvTYPE((SV*)gv) == SVt_PVGV && GvGP(gv) ? GvIOp(gv) : NULL) #define GvIOp(gv) (GvGP(gv)->gp_io) #define GvIOn(gv) (GvIO(gv) ? GvIOp(gv) : GvIOp(gv_IOadd(gv))) @@ -176,11 +176,14 @@ Return the SV from the GV. #undef GV_UNIQUE_CHECK #endif -#define Nullgv Null(GV*) +#ifndef PERL_CORE +# define Nullgv Null(GV*) +#endif #define DM_UID 0x003 #define DM_RUID 0x001 #define DM_EUID 0x002 +#define DM_ARRAY 0x004 #define DM_GID 0x030 #define DM_RGID 0x010 #define DM_EGID 0x020