You get 8 there because an array is a pointerish thing...
Btw, this:
my $not-null = CArray[int32].new
is not the same as this:
int a[3];
So, we would need fixed sized native arrays here to tell the truth.
Am 10.09.2016 um 20:53 schrieb Brandon Allbery via RT:
On Sat, Sep 10, 2016 at 10:11 AM, Itsuki Toyota <
perl6-bugs-follo...@perl.org> wrote:
$ perl6 -MNativeCall -e 'my $null = Pointer; my $not-null =
CArray[int32].new; $not-null[0] = 1; $not-null[1] = 1; $not-null[2] = 1;
say nativesizeof($not-null)'
8
That size looks doubly wrong to me. Its not going to happen for a 3-element
array no matter how you slice it... so I suspect you're getting the size of
one element, which is itself twice the size of what C thinks.