develooper Front page | perl.perl5.porters | Postings from May 2001

Re: [PATCH pp_sys.c] More warnings

Thread Previous | Thread Next
From:
Hugo
Date:
May 30, 2001 10:13
Subject:
Re: [PATCH pp_sys.c] More warnings
Message ID:
200105301616.RAA04606@crypt.compulink.co.uk
In <20010530175221.N464@pobox.com>, Graham Barr writes:
:On Wed, May 30, 2001 at 03:56:13PM +0100, Hugo wrote:
:> In <20010530143239.567.18@dromedary.ni-s.u-net.com>, Nick Ing-Simmons writes
::
:> :>PS  What's the difference between SvPV and SvPVx?
:> :
:> :Read the source (i.e. sv.h) ...
:> :
:> :SvPVx makes a copy of the SV * so that 
:> :
:> :SvPVx(*p++,len) is "okay"
:> :whereas 
:> :SvPV(*p++,len) isn't as the macro may do multiple ++s.
:> 
:> But SvPV doesn't actually use the argument multiple times.
:
:Yes it does if CRIPPLED_CC is not defined
:
:sv.h:894
:
:#define SvPV(sv, lp) \
:    ((SvFLAGS(sv) & (SVf_POK)) == SVf_POK \
:     ? ((lp = SvCUR(sv)), SvPVX(sv)) : sv_2pv(sv, &lp))

Ah, ok, I missed that one.

Hugo

Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About