Returns a list of the slot names in a foreign structure.
fli
foreign-slot-names object => slot-names
object⇩ |
A foreign object or a pointer to a foreign object. |
slot-names |
A list containing the slot names of object. |
The function foreign-slot-names
returns a list containing the slot names of object, whose foreign type was 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)
2.2.3 Structures and unions
define-c-struct
foreign-slot-value
Foreign Language Interface User Guide and Reference Manual - 01 Dec 2021 19:34:58