develooper Front page | perl.perl5.porters | Postings from October 2014

[perl #122392] xsubpp breaks typemap $func_args processing

From:
Tony Cook via RT
Date:
October 23, 2014 02:59
Subject:
[perl #122392] xsubpp breaks typemap $func_args processing
Message ID:
rt-4.0.18-26779-1414033185-390.122392-15-0@perl.org
On Sun Jul 27 01:30:53 2014, smueller@cpan.org wrote:
> On 07/25/2014 06:29 PM, bulk88 via RT wrote:
> > On Fri Jul 25 05:03:25 2014, davem wrote:
> >> I'm not a typemap expert - so if anyone wants to chip in to
> >> contradict me,
> >> feel free - but it appears that the $func_args variable is an
> >> undocumented
> >> internal implementation detail that not intended to be manipulated
> >> within
> >> a type map (unlike $var, $arg etc), and which has been removed in
> >> newer
> >> releases.
> >>
> >
> > There are many things that are undocumented but should be documented.
> > Here are my favorites.
> 
> Sorry, but there is no way (as long as I maintain it) that these
> things
> will ever be considered EU::ParseXS API. It's beating it with a stick.
> :(

I wonder if it would be worthwhile provide "official" mechanisms to do what they're doing in the typemap, so maybe:

 T_STR_LEN
    PREINIT:
        STRLEN ${var}Len;
    EXPAND:
        $var, ${var}Len
    INPUT:
    {
        SV * TmpSV = $arg;
        $var = ($type) SvPV( TmpSV , ${var}Len);
    };

I haven't tried to implement this yet.

Tony

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



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