Returns a pointer to the location of the slot slot-name in a foreign object of type type at ptr. The returned pointer points inside the structure. Both the pointer and the memory it points to have the same extent as ptr.
For aggregate slots, this is the same value returned by
foreign-slot-value
.
(defcstruct point "Pointer structure." (x :int) (y :int)) CFFI> (with-foreign-object (ptr 'point) (foreign-slot-pointer ptr 'point 'x)) => #<FOREIGN-ADDRESS #xBFFF6E60> ;; Note: the exact pointer representation varies from lisp to lisp.
defcstruct
foreign-slot-value
foreign-slot-names
foreign-slot-offset