[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: luaL_optboolean ?
- From: "Daniel Collins" <dcplus@...>
- Date: Wed, 12 Sep 2007 12:44:01 +1000
I was just wondering why the aux library provides luaL_opt* functions
for integers, numbers and strings but not for booleans. It is not a big
deal since I just define my own as
int luaL_optboolean (lua_State *L, int narg, int def)
{
return lua_isboolean(L, narg) ? lua_toboolean(L, narg) :
def;
}
I am just curious about why some types were chosen for the opt functions
and some were not.
- DC