Hello,

Please excuse my naivety, I'm trying to use NativeCall to interface a Perl6
program with a C library and I have a problem mapping a char ** argument.

The C function has this prototype:

void function(char **arg1, char **arg2);

I read that declaring a sub with Str rw parameters would do the trick:

sub test(Str $arg1 is rw, Str $arg2 is rw) is native('mylibrary') { * }

When I use the imported test function:

my Str ($arg1, $arg2);
test($arg1, $arg2);
say $arg1, $arg2;

what appears is just

(Str)(Str)

Obviously a C test program works fine with that library, so I guess I'm
just using the wrong NativeCall mapping.
Any hint?

-- 
Fernando Santagata

Reply via email to