[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: Etan Reisner <deryni@...>
- Date: Fri, 27 Jul 2007 17:35:19 -0400
Like I said you only handled one of the two possible interpretations of
'boolean' in lua, the true/false only case. The other is the way lua
treats things in an if ... then statement where anything other than false
or nil is 'true'. Your code doesn't handle that second interpretation,
because lua_isboolean checks the type of the value. So, for similar
reasons to why there isn't a default table copy I would assume that they
left it up to the person who wanted the check to write it there way.
But I am of course open to being corrected by the people who actually
know.
-Etan