Third consting batch
[p5sagit/p5-mst-13.2.git] / gv.h
diff --git a/gv.h b/gv.h
index 7db4ba0..91fbd56 100644 (file)
--- a/gv.h
+++ b/gv.h
@@ -1,6 +1,7 @@
 /*    gv.h
  *
- *    Copyright (c) 1991-2002, Larry Wall
+ *    Copyright (C) 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
+ *    2000, 2001, 2002, 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.
@@ -19,7 +20,7 @@ struct gp {
     U32                gp_cvgen;       /* generational validity of cached gv_cv */
     U32                gp_flags;       /* XXX unused */
     line_t     gp_line;        /* line first declared at (for -w) */
-    char *     gp_file;        /* file first declared in (for -w) */
+    const char * gp_file;      /* file first declared in (for -w) */
 };
 
 #define GvXPVGV(gv)    ((XPVGV*)SvANY(gv))
@@ -42,7 +43,7 @@ Return the SV from the GV.
 
 #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)
+#define GvIO(gv)       ((gv) && SvTYPE((SV*)gv) == SVt_PVGV && GvGP(gv) ? GvIOp(gv) : 0)
 #define GvIOp(gv)      (GvGP(gv)->gp_io)
 #define GvIOn(gv)      (GvIO(gv) ? GvIOp(gv) : GvIOp(gv_IOadd(gv)))
 
@@ -152,3 +153,8 @@ Return the SV from the GV.
 #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 */
+/*      SVf_UTF8 (more accurately the return value from SvUTF8) is also valid
+       as a flag to gv_fetch_pvn_flags, so ensure it lies outside this range.
+*/
+#define gv_fullname3(sv,gv,prefix) gv_fullname4(sv,gv,prefix,TRUE)
+#define gv_efullname3(sv,gv,prefix) gv_efullname4(sv,gv,prefix,TRUE)