[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: How to "check" for a boolean function argument through the C api
- From: Ralph Hempel <rhempel@...>
- Date: Fri, 27 Jul 2007 16:55:34 -0400
RJP Computing wrote:
How do you "check" for a boolean argument from the C api? For that
matter, I want the argument to have a default value of 'false'. I see
that there are a bunch of luaL_checkxxx() functions, but none for
boolean. There is also the set of luaL_optxxx() functions and boolean is
not there either.
Ryan, I could not find it in the C API either, so I wrote my own
versions based on how the other versions that check for int, string, etc
Then I figured there must be a good reason why that seemingly obvious
API call is not included and decided to use 0 and non-zero integers
Can anyone explain why these are not in the API?