[Openmcl-devel] Casting a FFI pointer

Edi Weitz edi at agharta.de
Thu Aug 14 14:45:09 PDT 2003

On Thu, 14 Aug 2003 15:37:27 -0600 (MDT), Gary Byers <gb at clozure.com> wrote:

> Yes.  A pointer is basically the same thing that CMUCL would call a
> SAP; the foreign type information is expressed in the operation that
> references it:
> (pref p :rectangle.width) ;;(where "pref" is a "pointer-reference" operator)
> (pref p :circle.radius)
> could both be applied to the same pointer P.  In this example, at
> least one of these references would almost certainly yield an
> unexpected result, unless P is pointing at a rectangular circle ...

Thanks, that's seems like good enough info to start with.

I'll see if I can convince my wife to give me her PowerBook for a
couple of hours this weekend so I can play around and see if I can
implement the new macro for OpenMCL. (An old Pismo laptop and OS X is
started from an external FireWire drive. It's painfully slow but I'll
cope with it somehow... :)

If anyone with a fast Mac who knows more about OpenMCL and OS X than
me (virtually every subscriber to this list, I suppose) would like to
do it, please go ahead...

The new macro is WITH-CAST-POINTER and it's part of UFFI 1.2.23 which
can be downloaded from <http://uffi.b9.com/>. From what I seem to
understand it looks like this has to be a no-op like for AllegroCL
while DEREF-POINTER and DEREF-ARRAY will probably have to be modified.


Openmcl-devel mailing list
Openmcl-devel at clozure.com

More information about the Openmcl-devel mailing list