[squeak-dev] Passing RawBitsArray subtypes to FFI?
marcel.taeumel at hpi.de
Tue Sep 7 09:30:51 UTC 2021
> However, I'm unable to do this because the call results in "could not
> coerce the arguments" error.
We are on it. Sorry for the inconvenience.
Am 07.09.2021 08:58:36 schrieb Michał Olszewski <m.olszewski at nexat.pl>:
I'm currently working on bindings to vector graphics engine library and,
to avoid creating redundant classes, I pass float arrays (Float64Array)
to functions expecting a struct (the parameter is declared as
void*/double*. Its not like C cares whether its an array of constant
size or a struct).
However, I'm unable to do this because the call results in "could not
coerce the arguments" error.
I performed a small test, by using #adoptInstance (damn, love how I can
fiddle with guts of the system, so cool) on Float64Array object to turn
it into ByteArray and... it actually works.
Am I doing something wrong or it's just that the FFI doesn't support
passing RawBitsArray subclasses (besides ByteArray) yet?
PS. I'm using Squeak 6.0 20623
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Squeak-dev