develooper Front page | perl.perl5.porters | Postings from February 2015

Re: [perl #123814] grok_atou() for regexp quantifiers

Thread Previous
Karl Williamson
February 27, 2015 20:04
Re: [perl #123814] grok_atou() for regexp quantifiers
Message ID:
On 02/27/2015 11:08 AM, Hugo van der Sanden via RT wrote:
> On Thu Feb 19 08:44:25 2015, wrote:
>> We should strive for a really good API before releasing it to the
>> public.  At this late date, it seems advisable to restrict the use of
>> this one to the core given there are complaints about it.
> I tried restricting the new function:
> -Apdn   |bool   |grok_atoUV     |NN const char* pv|NN UV* valptr|NULLOK const char** endptr
> +EXpdn  |bool   |grok_atoUV     |NN const char* pv|NN UV* valptr|NULLOK const char** endptr
> .. but ext/Dynaloader complains it can't see it. Should I simply be adding a #define PERL_EXT to that module? I had assumed all the core extensions would get that automatically, so I'm not sure what the ramifications are.
> Hugo
> ---
> via perlbug:  queue: perl5 status: open

Someone else will have to tell us about the ramifications of adding 

But, I think the embed.fnc entry should have an M flag, and the
  =for apidoc
line removed from the documentation for the function.  That will mean 
that no documentation is generated, and so someone would have to be 
looking through the code to even know that this function exists.

One option that wouldn't have further ramifications would be to add a 
line to dlutils.c
     #define PERL_IN_DLUTILS_C
and then in embed.fnc, surround its entry with

#if defined(PERL_CORE) || defined(PERL_EXT) || defined(PERL_IN_DLUTILS_C)

and an #endif.

That way the prototype for the function is available only to the 
specified areas and no others, unless someone is really crazy and adds 
there own #defines to get around our restriction.

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