[cffi-devel] shareable-byte-vectors for Allegro
John Fremlin
jf at msi.co.jp
Mon Jan 19 02:35:38 UTC 2009
"Luís Oliveira" <luismbo at gmail.com> writes:
> On Tue, Jan 13, 2009 at 8:50 AM, John Fremlin <jf at msi.co.jp> wrote:
>> After some internal discussion, we have come up with this patch
>
> Pushed it, thanks!
Duane at Franz has helpfully come up with a decent way to get the real
foreign address from a Lisp array.
(let ((x (make-array 10 :element-type '(unsigned-byte 8) :allocation :static-reclaimable)))
(ff:fslot-address-typed :unsigned-char :lisp x))
We will test a modification of with-shareable-byte-vector to use this
mechanism for ,ptr-var, hopefully it will work well.
There is still a question of the exact foreign-type we should use
(:unsigned-char or :int or a dummy).
More information about the cffi-devel
mailing list