[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: "luaL_opt" not documented?
- From: Roberto Ierusalimschy <roberto@...>
- Date: Sun, 7 Feb 2016 11:30:17 -0200
> 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