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