Skip to content
Browse files

Make NativeCall::Types::CArray an Iterable

Fixes R#2681.  FWIW, the tests of the module pass ok now.  But I'm a bit
baffled by the fact that there is no visible "iterator" method in the class,
so I'm not 100% this is the solution.  It *is* however 'make test' and
'make spectest' clean, and it makes all of the tests of Crypt::TweetNacl
  • Loading branch information...
lizmat committed Feb 8, 2019
1 parent 5be7555 commit ada116ef99a2a68dc6e1f77f2c3959f1d4e49e0d
Showing with 1 addition and 1 deletion.
  1. +1 −1 lib/NativeCall/Types.pm6
@@ -89,7 +89,7 @@ our class Pointer is repr('CPointer') {

# CArray class, used to represent C arrays.
our class CArray is repr('CArray') is array_type(Pointer) {
our class CArray is repr('CArray') does Iterable is array_type(Pointer) {
method AT-POS(::?CLASS:D: $pos) { die "CArray cannot be used without a type" }

my role IntTypedCArray[::TValue] does Positional[TValue] is array_type(TValue) {

0 comments on commit ada116e

Please sign in to comment.
You can’t perform that action at this time.