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

Re: compile warnings w/ PM_SETRE and ReREFCNT_inc

Thread Previous | Thread Next
From:
Nicholas Clark
Date:
January 9, 2008 09:25
Subject:
Re: compile warnings w/ PM_SETRE and ReREFCNT_inc
Message ID:
20080109172507.GR23703@plum.flirble.org
On Wed, Jan 09, 2008 at 05:21:19PM -0000, Robin Barker wrote:
> 
> > > Nicholas's patch 32890 solved this problem another way.  
> > > I don't think both patches should be applied.
> > 
> > I didn't comment earlier because I wasn't sure if my patch fixed 
> > it all.  I was waiting for black smoke, particularly from VMS.
> 
> If more changes are needed, I would prefer replacing:
> 
> 	(REGEXP *) SvREFCNT_inc(zwapp);	
> by
> 	SvREFCNT_inc(zwapp); 
> 	zwapp;
> 
> The current code casts the argument to (SV*), which is returned by 
> SvREFCNT_inc and cast back to (REGEXP*)!  If we want the macro to
> return the (REGEXP*) cast of its argument, lets do it explicitly.

Yes, this feels like the right way to do it.

Nicholas Clark

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