On 12/8/19 8:19 PM, Fernando Santagata wrote:
It looks like a bug: the docs
(https://docs.raku.org/language/nativetypes) specify that 'byte' and
'uint8' are the same and correspond to uint8_t in C.
Substituting 'uint8' to 'byte' in your code returns the same result.
Out of curiosity, if it is something meant for the public, what native
call interface are you working on?
Hi Fernando,
I'm working on the Gnome GTK+ interface. I started this as a learning
task for the native call interface but it is grown into a huge project.
The packages are Gnome::N, Gnome::Glib, Gnome::GObject, Gnome::Gdk3,
Gnome::Gtk3, Gnome::Gtk3::Glade and more to come.
On Sun, Dec 8, 2019 at 8:08 PM Marcel Timmerman <mt1...@gmail.com
<mailto: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
--
Fernando Santagata