/* gv.h
*
- * Copyright (c) 1991-1994, Larry Wall
+ * Copyright (c) 1991-1999, 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.
struct io * gp_io; /* filehandle value */
CV * gp_form; /* format value */
AV * gp_av; /* array value */
- HV * gp_hv; /* associative 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 */
- I32 gp_lastexpr; /* used by nothing_in_common() */
+ U32 gp_flags; /* XXX unused */
line_t gp_line; /* line first declared at (for -w) */
- GV * gp_filegv; /* file first declared in (for -w) */
+ char * gp_file; /* file first declared in (for -w) */
};
#if defined(CRIPPLED_CC) && (defined(iAPX286) || defined(M_I286) || defined(I80286))
#define GvCVGEN(gv) (GvGP(gv)->gp_cvgen)
#define GvCVu(gv) (GvGP(gv)->gp_cvgen ? Nullcv : GvGP(gv)->gp_cv)
-#define GvLASTEXPR(gv) (GvGP(gv)->gp_lastexpr)
+#define GvGPFLAGS(gv) (GvGP(gv)->gp_flags)
#define GvLINE(gv) (GvGP(gv)->gp_line)
-#define GvFILEGV(gv) (GvGP(gv)->gp_filegv)
+#define GvFILE(gv) (GvGP(gv)->gp_file)
+#define GvFILEGV(gv) (gv_fetchfile(GvGP(gv)->gp_file))
#define GvEGV(gv) (GvGP(gv)->gp_egv)
#define GvENAME(gv) GvNAME(GvEGV(gv) ? GvEGV(gv) : gv)
#define DM_EGID 0x020
#define DM_DELAY 0x100
-#define GV_ADD 0x01
-#define GV_ADDMULTI 0x02
-#define GV_ADDWARN 0x04
+/*
+ * symbol creation flags, for use in gv_fetchpv() and get_*v()
+ */
+#define GV_ADD 0x01 /* add, if symbol not already there */
+#define GV_ADDMULTI 0x02 /* add, pretending it has been added already */
+#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 */