From: Nicholas Clark Date: Fri, 8 Jul 2005 15:57:16 +0000 (+0000) Subject: DEFSV causes GvSVn() to be used in lvalue context. X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=547f15c3f9c804a1f8fe9c9f91b4907c17953b29;p=p5sagit%2Fp5-mst-13.2.git 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 --- diff --git a/gv.h b/gv.h index 9034e59..0c776ba 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