(In the latest FFI)
Assume we have a native call declaration (we want to get values from x and y later):
primGetCurrentPointX: x Y: y
<primitive: #primitiveNativeCall module: #NativeBoostPlugin error: errorCode>
^self nbCall: #( void cairo_get_current_point (self, double * x, double * y))
Trying to use it as:
| x y |
x := (ByteArray new: 8).
y := (ByteArray new: 8).
self primGetCurrentPointX: x Y: y.
^ (x doubleAt: 1)@ (y doubleAt: 1)
Throws DNU ByteArray>>#rollAsDoubleToArity: arity .
However if primitive would be modified to:
^self nbCall: #( void cairo_get_current_point (self, void * x, void * y))
Exception goes away.
I'm just curios how it is supposed to be :)