On 12/6/06, Stelian Ionescu stelian.ionescu-zeus@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.