This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
avoid infinite loop in h2xs (from Hugo van der Sanden)
[perl5.git] / gv.h
diff --git a/gv.h b/gv.h
index fde836d..d2234a6 100644 (file)
--- a/gv.h
+++ b/gv.h
@@ -1,6 +1,6 @@
 /*    gv.h
  *
- *    Copyright (c) 1991-1999, Larry Wall
+ *    Copyright (c) 1991-2000, 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.
@@ -34,6 +34,14 @@ struct gp {
 #define GvSTASH(gv)    (GvXPVGV(gv)->xgv_stash)
 #define GvFLAGS(gv)    (GvXPVGV(gv)->xgv_flags)
 
+/*
+=for apidoc Am|SV*|GvSV|GV* gv
+
+Return the SV from the GV.
+
+=cut
+*/
+
 #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)
@@ -71,7 +79,7 @@ HV *GvHVn();
 
 #define GvLINE(gv)     (GvGP(gv)->gp_line)
 #define GvFILE(gv)     (GvGP(gv)->gp_file)
-#define GvFILEGV(gv)   (gv_fetchfile(GvGP(gv)->gp_file))
+#define GvFILEGV(gv)   (gv_fetchfile(GvFILE(gv)))
 
 #define GvEGV(gv)      (GvGP(gv)->gp_egv)
 #define GvENAME(gv)    GvNAME(GvEGV(gv) ? GvEGV(gv) : gv)
@@ -141,4 +149,3 @@ HV *GvHVn();
 #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 */