[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: LuaJIT 2 ffi (casting / force hotpath)
- From: Mike Pall <mikelu-1101@...>
- Date: Wed, 26 Jan 2011 14:23:47 +0100
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.
--Mike