summaryrefslogtreecommitdiff
path: root/gv.h
diff options
context:
space:
mode:
authorDavid Mitchell <davem@iabyn.com>2013-11-12 15:39:04 +0000
committerDavid Mitchell <davem@iabyn.com>2013-11-13 10:38:40 +0000
commitc835650ead1b96c706212d7e6d95da86cc9e8fcb (patch)
tree12342d2b372ce61459c4b68009aa276c49d5988f /gv.h
parent406e3fef7f4bebd2003087bce74d22303981ac48 (diff)
downloadperl-c835650ead1b96c706212d7e6d95da86cc9e8fcb.tar.gz
fix definition of GvFILEGV()
It was: #define GvFILE(gv) (GvFILE_HEK(gv) ? HEK_KEY(GvFILE_HEK(gv)) : NULL) #define GvFILEGV(gv) (gv_fetchfile(GvFILE(gv))) which is a problem, since gv_fetchfile() doesn't accept a non-null argument. Change it so that the (cond ? foo : NULL) thing is outside gv_fetchfile(). This is all a bit academic since GvFILE_HEK should never be null, but it at least it shuts up a compiler warning.
Diffstat (limited to 'gv.h')
-rw-r--r--gv.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/gv.h b/gv.h
index 1e17f35d46..d7ca92fb58 100644
--- a/gv.h
+++ b/gv.h
@@ -141,8 +141,9 @@ Return the CV from the GV.
#define GvLINE(gv) (GvGP(gv)->gp_line)
#define GvFILE_HEK(gv) (GvGP(gv)->gp_file_hek)
-#define GvFILE(gv) (GvFILE_HEK(gv) ? HEK_KEY(GvFILE_HEK(gv)) : NULL)
-#define GvFILEGV(gv) (gv_fetchfile(GvFILE(gv)))
+#define GvFILEx(gv) HEK_KEY(GvFILE_HEK(gv))
+#define GvFILE(gv) (GvFILE_HEK(gv) ? GvFILEx(gv) : NULL)
+#define GvFILEGV(gv) (GvFILE_HEK(gv) ? gv_fetchfile(GvFILEx(gv)) : NULL)
#define GvEGV(gv) (GvGP(gv)->gp_egv)
#define GvEGVx(gv) (isGV_with_GP(gv) ? GvEGV(gv) : NULL)