Package: cffi
Macro defcenum
Lambda Listdefcenum (name-and-options &body enum-list) SyntaxArgumentsDetails The defcenum macro is used to define foreign types that map keyword symbols to integer values, similar to the C enum type. If value is omitted its value will either be 0, if it's the first entry, or it it will continue the progression from the last specified value. Keywords will be automatically converted to values and vice-versa when being passed as arguments to or returned from foreign functions, respectively. The same applies to any other situations where an object of an enum type is expected. Types defined with defcenum canonicalize to base-type which is :int by default. Examples(defcenum boolean :no :yes) | See also |