--- old-cffi/src/types.lisp 2006-12-05 01:12:07.000000000 +0100 +++ new-cffi/src/types.lisp 2006-12-05 01:12:07.000000000 +0100 @@ -452,11 +452,14 @@ (defmacro with-foreign-slots ((vars ptr type) &body body) "Create local symbol macros for each var in VARS to reference foreign slots in PTR of TYPE. Similar to WITH-SLOTS." - (let ((ptr-var (gensym "PTR"))) + (let ((ptr-var (gensym "PTR")) + (type-package (symbol-package type))) `(let ((,ptr-var ,ptr)) (symbol-macrolet ,(loop for var in vars - collect `(,var (foreign-slot-value ,ptr-var ',type ',var))) + for true-slot = (intern (string-upcase (symbol-name var)) + type-package) + collect `(,var (foreign-slot-value ,ptr-var ',type ',true-slot))) ,@body)))) ;;;# Foreign Unions