Next: defctype, Previous: defcstruct, Up: Foreign Types [Contents][Index]
doc-and-slots ::= [docstring] { (slot-name slot-type &key count) }*
The name of new union type.
A documentation string, ignored.
A symbol naming the slot.
The type specifier for the slot.
Used to declare an array of size count inside the structure.
A union is a structure in which all slots have an offset of zero. It
is isomorphic to the C union
. Therefore, you should use the
usual foreign structure operations for accessing a union’s slots.
(defcunion uint32-bytes
(int-value :unsigned-int)
(bytes :unsigned-char :count 4))