I am working with the C Framework on MacRuby which has a structure
int CPhidget_getSerialNumber(CPhidgetHandle phid,int * serialNumber)
You can see the full documentation here (if you are interested).
On MacRuby, I tried the following:
i = CPhidget_getSerialNumber(@encoder, nil)
The above number is me, not the serial number.
CPhidget_getSerialNumber(@encoder, i)
This causes me an error: the expected pointer instance received `0 '(Fixnum) (TypeError) (which does not surprise me).
So my main question is: is there a C-pointer equivalent in MacRuby?
source
share