Skip to content

Instantly share code, notes, and snippets.

@jonathanstowe
Last active August 29, 2015 14:23
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jonathanstowe/98025c6b0df7a6f992dc to your computer and use it in GitHub Desktop.
Save jonathanstowe/98025c6b0df7a6f992dc to your computer and use it in GitHub Desktop.
CArray weirdness
use v6;
use NativeCall;
my @buff := CArray[num64].new;
my @in = (^100).map({Num($_)});
for ^100 -> $i {
@buff[$i] = @in[$i];
}
my @in2;
for ^100 -> $i {
@in2[$i] = @buff[$i];
}
my @buff2 := CArray[num64].new;
for ^100 -> $i {
@buff2[$i] = @in2[$i];
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment