lua-users home
lua-l archive

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


> While studying the source code for the standard table library, I
> noticed that function "unpack" uses the macro "luaL_opt", which is
> defined in "lauxlib.h". Because it is defined in lauxlib.h, and
> because of its "luaL_" prefix, I assumed that this macro is considered
> part of the official auxiliary library, yet it is nowhere to be found
> in the 5.3 reference manual.
> 
> Is this an accidental omission, in which case it should be added to
> the manual, or is it left out of the manual for a reason, and if so,
> what is that reason?

That macro is a kludge. It seems it would be more work to understand
its documentation then to write what you want explicitly. (We probably
should not use it, too.)  (Case in point: its current use in 'tconcat'
is just a complicated way to say 'luaL_optinteger'...)

-- Roberto