Converts between a Lisp symbol and a C enum
.
keyword
:enum &rest enum-constants
:enumeration &rest enum-constants
enum-constants ::= {entry-name | (entry-name entry-value)}*
enum-constants⇩ |
A sequence of one or more symbols naming the elements of the enumeration. |
entry-name⇩ |
A symbol naming an element of the enumeration. |
entry-value⇩ |
An integer specifying the value of entry-name. |
The FLI type :enum
converts between a Lisp symbol and the C enum
type. Each entry in enum-constants can either consist of a symbol entry-name, in which case the first entry has a value 0, or of a list of a symbol entry-name and its corresponding integer value entry-value.
:enumeration
is a synonym for :enum
.
See define-c-enum, for an example using the :enum
type.
Foreign Language Interface User Guide and Reference Manual - 01 Dec 2021 19:34:59