Name
def-struct — Defines a C
structure.
Macro
Syntax
def-struct
name &rest fields
Arguments and Values
name
A symbol that names the structure.
fields
A variable number of field defintions. Each definition is a list consisting of a symbol naming the field followed by its foreign type.
Description
Declares a structure. A special type is available as a slot
in the field. It is a pointer that points to an instance of the parent
structure. It's type is :pointer-self
.
Examples
(def-struct foo (a :unsigned-int)
(b (* :char))
(c (:array :int 10))
(next :pointer-self))
Side Effects
Creates a foreign type.
Exceptional Situations
None.