FFI / Primitive question

John M McIntosh johnmci at smalltalkconsulting.com
Mon Jun 11 04:52:05 UTC 2007


If you download Sophie you'll find lots of FFI calls especially in  
the area of navigation Services and QuickTime each of which require  
using much more
complex structures that Mac Rectangles.

On Jun 10, 2007, at 7:43 PM, Joshua Gargus wrote:

> I think that I was a bit confused.  If I now understand correctly,  
> the second argument to #primitive:parameters: doesn't do anything  
> special for FFI types (i.e. subclasses of ExternalObject); it is  
> just a dynamic type test that can be applied to any type of Squeak  
> object.
>
> Is it true that the slang code must explicitly handle the two cases  
> where the 'handle' iVar of an ExternalObject refers to:
> 	- the binary data for the object (when the handle is a ByteArray)
> 	- a pointer to data on the C-heap (when the handle is an  
> ExternalAddress)   ?
> Or, is there some feature of Slang, FFI, etc. to make it easier to  
> work with ExternalObjects?  I suspect that there isn't.
>
> Thanks,
> Josh
>

--
======================================================================== 
===
John M. McIntosh <johnmci at smalltalkconsulting.com>
Corporate Smalltalk Consulting Ltd.  http://www.smalltalkconsulting.com
======================================================================== 
===





More information about the Squeak-dev mailing list