
On Fri, Jan 9, 2009 at 12:51 AM, John Fremlin <jf@msi.co.jp> wrote:
The page <http://www.franz.com/support/documentation/8.1/doc/foreign-functions.htm> documents the :FOREIGN-ADDRESS type.
I kept trying to point out that this was being used by cffi as a *Lisp* type not a *foreign-type*. It is not a Lisp type.
Oh, yes, that part was clearly broken. But it was being used a foreign type as well, but even then it doesn't seem to work in all contexts.
The other change from my patch was about allocating the stack objects in a space that will not be moved by the GC.
I've applied that already, thanks! IIUC, :FOREIGN-STATIC-GC is only relevant when WITH-STACK-FOBJECT fails to stack allocate, in which case it actually allocates on the heap. Hmm, now that I read the documentation more carefully, it seems that if WITH-STACK-FOBJECT allocates on the heap then it won't deallocate the object and we should be using WITH-STATIC-FOBJECT instead. Does that sound right? If it does, I'll apply the attached patch during the weekend or so.
Is it a necessary according to the CFFI semantics of with-foreign-object?
Indeed. -- Luís Oliveira http://student.dei.uc.pt/~lmoliv/