develooper Front page | perl.perl5.porters | Postings from January 2003

Re: [PATCH] %_ (was Re: [PATCH] operation on `PL_na' may be undefined)

Thread Previous | Thread Next
From:
Dave Mitchell
Date:
January 8, 2003 03:15
Subject:
Re: [PATCH] %_ (was Re: [PATCH] operation on `PL_na' may be undefined)
Message ID:
20030108111214.A534@fdgroup.com
On Tue, Jan 07, 2003 at 10:40:54PM +0000, Nicholas Clark wrote:
> On Tue, Jan 07, 2003 at 06:01:49PM +0100, Rafael Garcia-Suarez wrote:
> > hv@crypt.org wrote:
> > > Thanks, the three that refer to PerlIO_printf:
> > > :+++ ./pad.c    Wed Dec 25 21:20:45 2002
> > > :@@ -878,8 +878,8 @@ Perl_intro_my(pTHX)
> > > :@@ -926,8 +926,8 @@ Perl_pad_leavemy(pTHX)
> > > :+++ ./sv.c Wed Dec 25 19:24:59 2002
> > > :@@ -9359,8 +9360,9 @@ Perl_sv_dup(pTHX_ SV *sstr, CLONE_PARAMS
> > > 
> > > give compiler warnings:
> > > pad.c: In function `Perl_intro_my':
> > > pad.c:878: warning: unknown conversion type character `_' in format
> > > pad.c:878: warning: long unsigned int format, pointer arg (arg 4)
> > > pad.c:878: warning: too many arguments for format

Note that %_ should *not* be used to print SVs containing the names
of pad lexicals, since for these the SvCUR() field is hijacked for the
generation number. Sticking with %s and PVX(sv) is the Right Thing to do
here.  (See PAD_COMPNAME_GEN()).

Dave.

-- 
"But Sidley Park is already a picture, and a most amiable picture too.
The slopes are green and gentle. The trees are companionably grouped at
intervals that show them to advantage. The rill is a serpentine ribbon
unwound from the lake peaceably contained by meadows on which the right
amount of sheep are tastefully arranged." Lady Croom - Arcadia

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