Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Adds rakudo-specific native types. Closes #2142
  • Loading branch information
JJ committed Jul 5, 2018
1 parent 34d8575 commit 13b8c95
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions doc/Language/nativetypes.pod6
Expand Up @@ -156,6 +156,20 @@ ssize_t (size_t in C)
bool (bool in C)
=end table
You can use them in the same way they would be used in native C:
=begin code
use NativeCall;
my $just-an-array = CArray[int32].new( 1, 2, 3, 4, 5 );
loop ( my size_t $i = 0; $i < $just-an-array.elems; $i++ ) {
say $just-an-array[$i];
}
=end code
Which would print the five elements of the array, as it should be expected.
=end pod

# vim: expandtab softtabstop=4 shiftwidth=4 ft=perl6

0 comments on commit 13b8c95

Please sign in to comment.