<p class="MsoNormal"><span lang="EN-US" style="mso-ansi-language:EN-US">Hi, I’m
trying to make a Squeak interface to OpenCV, the computer vision library, and I
have a few newbie questions about FFI:</span></p><p class="MsoNormal"><span lang="EN-US" style="mso-ansi-language:EN-US"><span lang="EN-US" style="mso-ansi-language:
EN-US"><span style="mso-list:Ignore">1)<span style="font:7.0pt &quot;Times New Roman&quot;">     
</span></span></span><span lang="EN-US" style="mso-ansi-language:EN-US">I
managed to make an ExternalStructure for the IplImage and other simple structs
such as CvScalar, CvSize, etc. I have a problem when trying to make the
ExternalStructure for CvMat, which represents a matrix, because some members
are unions. What should I do to make an ExternalStructure with unions?<span lang="EN-US" style="mso-ansi-language:
EN-US"><span style="mso-list:Ignore"></span></span></span></span></p><p class="MsoNormal"><span lang="EN-US" style="mso-ansi-language:EN-US"><span lang="EN-US" style="mso-ansi-language:EN-US"><span lang="EN-US" style="mso-ansi-language:
EN-US"><span style="mso-list:Ignore">2)<span style="font:7.0pt &quot;Times New Roman&quot;">     
</span></span></span><span lang="EN-US" style="mso-ansi-language:EN-US">To
finalize objects the OpenCV library defines some functions such as cvReleaseImage,
cvReleaseMat, etc. As far as I can tell, these functions receive a pointer-to-pointer
as argument. How can I declare such a method in Squeak? Having one object, how
can I get the pointer to that object? Should I use the #getHandle method?<span lang="EN-US" style="mso-ansi-language:
EN-US"><span style="mso-list:Ignore"></span></span></span></span></span></p><p class="MsoNormal"><span lang="EN-US" style="mso-ansi-language:EN-US"><span lang="EN-US" style="mso-ansi-language:EN-US"><span lang="EN-US" style="mso-ansi-language:EN-US"><span lang="EN-US" style="mso-ansi-language:
EN-US"><span style="mso-list:Ignore">3)<span style="font:7.0pt &quot;Times New Roman&quot;">     
</span></span></span><span lang="EN-US" style="mso-ansi-language:EN-US">Some
OpenCV functions are declared as inline functions. I haven’t been able to
access those functions from Squeak. Is this an expected behavior?</span></span></span></span></p>

<p class="MsoNormal"><span lang="EN-US" style="mso-ansi-language:EN-US">So far, these
are the problems I encounter. As you may see from the questions above my
knowledge of Squeak, FFI and C is pretty limited, so I would be very thankful
if someone could give me a hand with these issues.</span></p><p class="MsoNormal">Thanks, bye</p>