3 * Copyright (c) 1991-1994, Larry Wall
5 * You may distribute under the terms of either the GNU General Public
6 * License or the Artistic License, as specified in the README file.
11 SV * gp_sv; /* scalar value */
12 U32 gp_refcnt; /* how many globs point to this? */
13 struct io * gp_io; /* filehandle value */
14 CV * gp_form; /* format value */
15 AV * gp_av; /* array value */
16 HV * gp_hv; /* associative array value */
17 GV * gp_egv; /* effective gv, if *glob */
18 CV * gp_cv; /* subroutine value */
19 U32 gp_cvgen; /* generational validity of cached gv_cv */
20 I32 gp_lastexpr; /* used by nothing_in_common() */
21 line_t gp_line; /* line first declared at (for -w) */
22 GV * gp_filegv; /* file first declared in (for -w) */
26 #if defined(CRIPPLED_CC) && (defined(iAPX286) || defined(M_I286) || defined(I80286))
30 #define GvXPVGV(gv) ((XPVGV*)SvANY(gv))
32 #define GvSV(gv) (GvGP(gv)->gp_sv)
33 #define GvREFCNT(gv) (GvGP(gv)->gp_refcnt)
34 #define GvIO(gv) ((gv) && SvTYPE((SV*)gv) == SVt_PVGV ? GvIOp(gv) : 0)
35 #define GvIOp(gv) (GvGP(gv)->gp_io)
36 #define GvIOn(gv) (GvIO(gv) ? GvIOp(gv) : GvIOp(gv_IOadd(gv)))
38 #define GvFORM(gv) (GvGP(gv)->gp_form)
39 #define GvAV(gv) (GvGP(gv)->gp_av)
41 #ifdef MICROPORT /* Microport 2.4 hack */
44 #define GvAVn(gv) (GvGP(gv)->gp_av ? \
46 GvGP(gv_AVadd(gv))->gp_av)
48 #define GvHV(gv) ((GvGP(gv))->gp_hv)
50 #ifdef MICROPORT /* Microport 2.4 hack */
53 #define GvHVn(gv) (GvGP(gv)->gp_hv ? \
55 GvGP(gv_HVadd(gv))->gp_hv)
56 #endif /* Microport 2.4 hack */
58 #define GvCV(gv) (GvGP(gv)->gp_cv)
59 #define GvCVGEN(gv) (GvGP(gv)->gp_cvgen)
61 #define GvLASTEXPR(gv) (GvGP(gv)->gp_lastexpr)
63 #define GvLINE(gv) (GvGP(gv)->gp_line)
64 #define GvFILEGV(gv) (GvGP(gv)->gp_filegv)
66 #define GvFLAGS(gv) (GvGP(gv)->gp_flags)
68 #define GvEGV(gv) (GvGP(gv)->gp_egv)
70 #define GvGP(gv) (GvXPVGV(gv)->xgv_gp)
71 #define GvNAME(gv) (GvXPVGV(gv)->xgv_name)
72 #define GvNAMELEN(gv) (GvXPVGV(gv)->xgv_namelen)
73 #define GvENAME(gv) GvNAME(GvEGV(gv) ? GvEGV(gv) : gv)
75 #define GvSTASH(gv) (GvXPVGV(gv)->xgv_stash)
76 #define GvESTASH(gv) GvSTASH(GvEGV(gv) ? GvEGV(gv) : gv)
78 #define Nullgv Null(GV*)
86 #define DM_DELAY 0x100
88 #define GVf_INTRO 0x01
89 #define GVf_IMPORTED 0x02
92 #define GV_ADDMULTI 0x02
93 #define GV_ADDWARN 0x04