I hoped that: $ 6 'use NativeCall; dd my CArray[uint8] $ba .= new( 255, 254, 3, 4); dd $ba[0..*-1]' CArray[uint8] $ba = NativeCall::Types::CArray[uint8].new (-1, -2, 3, 4).Seq
would be a solution (usint "uint8" rather than "byte"), but alas, no, so this feels like a bug > On 8 Dec 2019, at 20:01, Marcel Timmerman <mt1...@gmail.com> wrote: > > Hello, > > I have a nasty problem using native call interface. I get an array of bytes > from a call representing a pixel buffer. I am storing it in a CArray[byte]. > Golfing it down it comes to the following (REPL) > > > > use NativeCall > > my CArray[byte] $ba .= new( 255, 254, 3, 4); > NativeCall::Types::CArray[byte].new > > $ba[0].WHAT > (Int) > > $ba[0..*-1] > (-1 -2 3 4) > > > This means (for me) that there is an implicit type conversion from unsigned > to signed integer and it is not possible to use positive numbers only, > afterwards. > > Regards, > Marcel