lua-users home
lua-l archive

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


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