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

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

Thread Previous | Thread Next
Tony Cook
January 17, 2010 15:29
Re: [perl #72108] gv_e?fullname[34] improvement
Message ID:
On Fri, Jan 15, 2010 at 08:46:43AM -0800, Nicholas Clark wrote:
> # New Ticket Created by  Nicholas Clark 
> # Please include the string:  [perl #72108]
> # in the subject line of all future correspondence about this issue. 
> # <URL: >
> 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.


Thread Previous | Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About