The function
enum-symbol-value
returns the index
index
of symbol
symbol
in the FLI enumerator type
enum-type
, or
nil
if
enum-type
does not contain
symbol
.
(fli:define-c-enum colors red green blue)
=>
(:ENUM COLORS)
(fli:enum-symbol-value 'COLORS 'red)
=>
0
(fli:define-c-enum half_year (jan 1) feb mar apr may jun)
=>
(:ENUM HALF_YEAR)
(fli:enum-symbol-value 'HALF_YEAR 'feb)
=>
2