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))
Graham.
Thread Previous
|
Thread Next