summaryrefslogtreecommitdiff
path: root/gv.h
diff options
context:
space:
mode:
authorNicholas Clark <nick@ccl4.org>2005-07-08 15:57:16 +0000
committerNicholas Clark <nick@ccl4.org>2005-07-08 15:57:16 +0000
commit547f15c3f9c804a1f8fe9c9f91b4907c17953b29 (patch)
tree1b91f3b2ebef3824c5135a597e64991d63a703e9 /gv.h
parent27ed30b88a644381a2e2f6c2b2814412d3b5c78c (diff)
downloadperl-547f15c3f9c804a1f8fe9c9f91b4907c17953b29.tar.gz
DEFSV causes GvSVn() to be used in lvalue context.
Not sure if instead we should recode DEFSV to avoid this, and leave GvSVn() as rvalue only, like its namesakes. p4raw-id: //depot/perl@25099
Diffstat (limited to 'gv.h')
-rw-r--r--gv.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/gv.h b/gv.h
index 9034e5984f..0c776ba870 100644
--- a/gv.h
+++ b/gv.h
@@ -42,9 +42,9 @@ Return the SV from the GV.
#define GvSV(gv) (GvGP(gv)->gp_sv)
#ifdef PERL_DONT_CREATE_GVSV
-#define GvSVn(gv) (GvGP(gv)->gp_sv ? \
- GvGP(gv)->gp_sv : \
- GvGP(gv_SVadd(gv))->gp_sv)
+#define GvSVn(gv) (*(GvGP(gv)->gp_sv ? \
+ &(GvGP(gv)->gp_sv) : \
+ &(GvGP(gv_SVadd(gv))->gp_sv)))
#else
#define GvSVn(gv) GvSV(gv)
#endif