[squeak-dev] Re: [smalltalk-research] Aliens and CObject

Gilad Bracha gbracha at gmail.com
Mon Mar 8 16:15:18 UTC 2010

On Mon, Mar 8, 2010 at 7:29 AM, Paolo Bonzini <bonzini at gnu.org> wrote:
> The other more high-level feature of CObject, as far as I can see, is that
> it includes classes like CInt, CDouble, CString, CPtr or CArray. These embed
> the ABI knowledge; they support C-like pointer arithmetic (i.e. incrementing
> a CInt is equivalent to incrementing an int *).  Like an Alien, they can
> represent any of malloced/GCed/foreign storage, though the arithmetic has
> bounds checking only if the backing store for the CObject is garbage
> collected.  They are also the basic building blocks for CStruct/CUnion.

Some of this sort of thing exists in the module CAPI in the Newspeak
version.  A fair amount of convenience is available using such wrappers. We
also have a Win32API module. These things only contain functionality we
actually used, but they do help avoid repeating some of the boiler plate. A
higher level mechanism is certainly useful.

Cheers, Gilad
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20100308/2a2f0104/attachment.htm

More information about the Squeak-dev mailing list