Macro
struct type. fli
define-c-struct name &rest slot-descriptions => list
slot-descriptions ::= {slot-name | (slot-name slot-type)}*
The name of the new structure type specifier.
A sequence of symbols, possibly with type descriptions, naming the slots of the structure.
A symbol naming the slot.
The FLI type of the slot.
The list(:structname).
define-c-struct is used to define an FLI structure type specifier, which corresponds to the Cstruct type. It is a convenience function, as a structure type could also be defined usingdefine-foreign-type. foreign-slot-type andforeign-slot-value functions. define-c-struct, and the corresponding C code is given.
(fli:define-c-struct a-point (x :int)
(y :int)
(color :byte)
(ident :char))
struct a-point {
int x;
int y;
byte color;
char ident;
};