[Pharo-project] Status of Alien FFI
squeaklists at fang.demon.co.uk
Wed Sep 16 15:02:31 EDT 2009
Ken Treis wrote:
> * I'm creating a partial Alien library for GemStone so that I can use
> the CairoGraphics package in both Pharo and GLASS. But on x86-64,
> there there's a size difference between a pointer/long and an integer.
> It'd be nice to have some more explicit APIs on Alien, so I could say
> "Alien newCInteger" or "Alien newCLong" and have the platform return
> me the proper size Alien. Even without the platform size differences,
> it seems awkward to use "Alien newC: 4" everywhere I want an integer,
> "Alien newC: 8" where I want a double, etc.
> * Similarly, I'd like an API on AlienLibrary that distinguishes
> between integers and longs. In the CairoGraphics package I've added
> some methods to this effect:
One minor point is that whether integers and longs are different depends
on the platforms data model. Under MS Win64, integers and long integers
are both 32bit, while on most unixes integers are 32bit while long ints
are 64bit. (LLP64 and LP64 models respectively)
I don't know if this is important though.
More information about the Pharo-dev