Skip to content

Instantly share code, notes, and snippets.

@Whateverable
Created April 19, 2019 09:16
Show Gist options
  • Save Whateverable/7f1e7d0c1a150da57d8efa76d5e52387 to your computer and use it in GitHub Desktop.
Save Whateverable/7f1e7d0c1a150da57d8efa76d5e52387 to your computer and use it in GitHub Desktop.
evalable6
use NativeCall; my $b = Buf.allocate(10, 1, 2, 3, 4, 5); say $b.WHERE; my $c = nativecast(Pointer, $b); my $d = nativecast(CArray[uint8], $c); $d[$_].say for ^10;
(exit code 1)
Cannot resolve caller allocate(Buf:U: Int:D, Int:D, Int:D, Int:D, Int:D, Int:D); none of these signatures match:
(Blob:U: Int:D $elements, *%_)
(Blob:U: Int:D $elements, int $value, *%_)
(Blob:U: Int:D $elements, Int:D \value, *%_)
(Blob:U: Int:D $elements, Mu:D $got, *%_)
(Blob:U: Int:D $elements, int @values, *%_)
(Blob:U: Int:D $elements, Blob:D $blob, *%_)
(Blob:U: Int:D $elements, @values, *%_)
in block <unit> at /tmp/xhgDX7ha38 line 1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment