develooper Front page | perl.perl5.porters | Postings from December 2002

Re: [PATCH] operation on `PL_na' may be undefined

Thread Previous | Thread Next
From:
Rafael Garcia-Suarez
Date:
December 11, 2002 07:22
Subject:
Re: [PATCH] operation on `PL_na' may be undefined
Message ID:
20021211161647.39b89b14.rgarciasuarez@free.fr
John Peacock <jpeacock@rowman.com> wrote:
> Nicholas Clark wrote:
> > Both SvPV macros are assigning to PL_na. Using PL_na in the first place isn't
> > a great idea, as it's in thread local storage on a threaded perl.
> > 
> 
> -	    Perl_croak(aTHX_ "%s version %s required--this is only version %s",
> -		HvNAME(pkg), SvPV(req,PL_na), SvPV(sv,PL_na));
> +	    Perl_croak(aTHX_ "%s version %_ required--this is only version %_",
> +		HvNAME(pkg), req, sv);
> 
> What is %_ ???  Does that force a stringification like SvPV does?  I originally 
> had SvPV_nolen, but that isn't supported in Perl < 5.6.0 so I reverted to what 
> you see above.

%_ : placeholder for an SV that will get stringified. See sv_vcatpvfn() in sv.c.
I can't find doc on this in the perl sources, but there a small paragraph
about it in the Cozens & Jenness.

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