lua-users home
lua-l archive

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


Hi list,

What is the simplest way to check a return value for false, doing the equivalent of the Lua code:

val == false

but with the C API...

My best guess for the moment is:

lua_isboolean(L, -1) && !lua_toboolean(L, -1)

But maybe there is another way...

                                                               Gaspard