lua-users home
lua-l archive

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


On Wed, 12 Sep 2007, Daniel Collins wrote:

> I was just wondering why the aux library provides luaL_opt* functions
> for integers, numbers and strings but not for booleans.

Just use lua_toboolean() and write the code so that missing and false
arguments do the same thing. This is the way to be most consistent with
Lua's boolean semantics.

Tony.
-- 
f.a.n.finch  <dot@dotat.at>  http://dotat.at/
IRISH SEA: SOUTHERLY, BACKING NORTHEASTERLY FOR A TIME, 3 OR 4. SLIGHT OR
MODERATE. SHOWERS. MODERATE OR GOOD, OCCASIONALLY POOR.