[cffi-devel] [PATCH] fix with-foreign-slots
Luís Oliveira
luismbo at gmail.com
Fri Dec 8 09:18:03 UTC 2006
On 12/6/06, Stelian Ionescu <stelian.ionescu-zeus at poste.it> wrote:
[...]
> (in-package :mypackage)
>
> (with-foreign-object (fooptr 'internals::foo)
> (with-foreign-slots ((x) fooptr internals::foo)
> x))
>
> (with-foreign-slots ((x) fooptr internals::foo) x) gets expanded to
>
> (LET ((#:PTR2455 FOOPTR))
> (SYMBOL-MACROLET ((X
> (FOREIGN-SLOT-VALUE #:PTR2455 'INTERNALS::FOO
> 'X)))
> X))
This is consistent with the way WITH-SLOTS, SLOT-VALUE, and pretty
much anything that deals with symbols and consequently packages.
WITH-FOREIGN-SLOTS is doing the right thing here.
--
Luís Oliveira
http://student.dei.uc.pt/~lmoliv/
More information about the cffi-devel
mailing list