develooper Front page | perl.perl5.porters | Postings from July 2016

[perl #72108] gv_e?fullname[34] improvement

From:
Dan Collins via RT
Date:
July 25, 2016 16:40
Subject:
[perl #72108] gv_e?fullname[34] improvement
Message ID:
rt-4.0.18-16139-1469464795-1886.72108-15-0@perl.org
On Sun May 30 16:42:19 2010, tonyc wrote:
> On Sun, May 30, 2010 at 02:19:11PM +0100, Nicholas Clark wrote:
> > On Mon, Jan 18, 2010 at 10:29:00AM +1100, Tony Cook wrote:
> > > On Fri, Jan 15, 2010 at 08:46:43AM -0800, Nicholas Clark wrote:
> >
> > > > It seems that a fairly common pairing in the perl source is:
> > > >
> > > > tmpsv = newSV(0);
> > > > gv_efullname3(tmpsv, gv, NULL);
> > > >
> > > > or generating a new mortal and passing it in.
> > > >
> > > > All functions in the gv_e?fullname{,3,4} family are ultimately
> > > > wrappers
> > > > around gv_fullname4(), which currently returns void, and takes a
> > > > not NULL
> > > > first argument.
> > > >
> > > > It would probably reduce the core's code size to change it to
> > > > return SV *,
> > > > and generate a new SV (possibly mortal) if the first argument is
> > > > NULL.
> > >
> > > Instead of overloading the interface, wouldn't it be better to add
> > > extra functions that create the GV, and then calls
> > > gv_e?fullname4().
> > >
> > > The new functions could be marked with the R flag to make sure the
> > > returned new GV isn't ignored.
> >
> > That's a good point.
> >
> > Do you have any suggestions for a name? [in 32 or fewer ASCII
> > characters :-)]
> 
> Maybe:
> 
> gv_new_e?fullname{,3,4}
> 
> though it sort of implies creating a new GV.  Otherwise:
> 
> gv_e?fullname_new_sv{,3,4}
> 
> Tony

Nicholas,

Have you made any progress on this ticket, or discovered anything that would block it? It seems to me that this is a simple request to add some functions, and a potentially time-consuming task to review the codebase and change to the new functions where applicable. Has this fallen by the wayside because the benefits are relatively minor, or because there's a problem?

-- 
Respectfully,
Dan Collins

---
via perlbug:  queue: perl5 status: open
https://rt.perl.org/Ticket/Display.html?id=72108



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