[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: How to "check" for a boolean function argument through the C api
- From: Merick <Merick_TeVaran@...>
- Date: Fri, 27 Jul 2007 16:21:25 -0500
Ralph Hempel wrote:
Can anyone explain why these are not in the API?
Ralph
Actually, there is:
if lua_type(L,1) = LUA_TBOOLEAN then arg = lua_toboolean(L,1) end
or, you could use the macro:
if lua_isboolean(L,1) then arg = lua_toboolean(L,1) end