The foreign-slot-names
function returns a list containing the slot names of a foreign object defined by define-c-struct. If object is not a structure, an error is signaled.
In the following example a structure with three slots is defined, an instance of the structure is made, and foreign-slot-names
is used to return a list of the slot names.
(fli:define-c-struct POS
(x :int)
(y :int)
(z :int))
(setq my-pos (fli:allocate-foreign-object :type 'POS))
(fli:foreign-slot-names my-pos)
LispWorks Foreign Language Interface User Guide and Reference Manual - 16 Feb 2015