Next: foreign-slot-names, Previous: foreign-enum-keyword, Up: Foreign Types [Contents][Index]
An enum
type.
A keyword symbol.
If true (the default), signal an error if keyword is not
defined in type. If false, foreign-enum-value
returns
nil
.
An integer.
The function foreign-enum-value
returns the value that
corresponds to keyword in type.
An error is signaled if type doesn’t contain such keyword, and errorp is true.
(defcenum boolean :no :yes) CFFI> (foreign-enum-value 'boolean :yes) ⇒ 1