— Deferences a pointer.
A pointer to a foreign object.
A foreign type of the object being pointed to.
The value of the object where the pointer points.
(let ((intp (allocate-foreign-object :int))) (setf (deref-pointer intp :int) 10) (prog1 (deref-pointer intp :int) (free-foreign-object intp))) => 10
The TYPE argument is ignored for CL implementations other than AllegroCL. If you want to cast a pointer to another type use WITH-CAST-POINTER together with DEREF-POINTER/DEREF-ARRAY.