lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]

Leonardo Palozzi wrote:
> Are enum function return types supported?
> I get "attempt to compare 'enum 95' with 'double'" error message when i
> try something like this:

Sorry, that was an oversight. Fixed in git HEAD.

>   if foo() == ffi.C.BLUE then ...

This should work now. Enum return values are treated like their
underlying type (uint32_t or int32_t), which is converted to a Lua
number as usual.