| Store | Cart

[perl #122392] xsubpp breaks typemap $func_args processing

From: Tony Cook via RT <perl...@perl.org>
Wed, 22 Oct 2014 19:59:45 -0700
On Sun Jul 27 01:30:53 2014, smue...@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

Recent Messages in this Thread
Tony Cook via RT Oct 23, 2014 02:59 am