On Mon, Apr 4, 2016 at 10:45 AM, Timo Paulssen wrote:
> Hey Tom,
>
> in NativeCall, "is rw" has a very special meaning. For example, if you have
> "int32 $foo is rw", you'll actually give the native function a pointer to an
> int, and perl6 will make that work out for you
Hey Tom,
in NativeCall, "is rw" has a very special meaning. For example, if you
have "int32 $foo is rw", you'll actually give the native function a
pointer to an int, and perl6 will make that work out for you properly if
you have an "int" or an "Int" variable that you pass.
Apparently we
I have a module LIBCIO.pm6:
unit module LIBCIO;
use NativeCall;
sub fopen(Str, Str) returns Pointer is native('libc') is export { * }
I then try to use it in a Perl 6 sub:
# try NativeCall
use lib '.';
use LIBCIO;
# get a file pointer
my Str $mode = 'r';
my $fp =