# New Ticket Created by  Itsuki Toyota 
# Please include the string:  [perl #129240]
# in the subject line of all future correspondence about this issue. 
# <URL: https://rt.perl.org/Ticket/Display.html?id=129240 >


See the following result

$ 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


I think that it should return 12, since the following equivalent C code returns 
12.

--

#include <stdio.h>

int main() {
  int a[3];
  a[0] = 1;
  a[1] = 1;
  a[2] = 1;
  printf("sizeof a: %d\n", sizeof(a)); // sizeof a: 12
}

--


$ gcc --version
gcc (Debian 4.9.2-10) 4.9.2
Copyright (C) 2014 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

$ perl6 --version
This is Rakudo version 2016.07.1-199-gdd9b760 built on MoarVM version 
2016.07-17-g40948f6
implementing Perl 6.c.

Reply via email to