lua-users home
lua-l archive

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


2017-12-13 15:33 GMT+02:00 Viacheslav Usov <via.usov@gmail.com>:
> On Wed, Dec 13, 2017 at 1:43 PM, Roberto Ierusalimschy
> <roberto@inf.puc-rio.br> wrote:
>
>> 'lua_next' works only with tables. Both cases are wrong.
>
> I do not think that this is stated in the manual. That is, "if you call this
> function for a value on the stack other than a table, the behaviour is
> undefined".
...
> ... so my natural expectation from reading all of that was that it
> should raise a Lua error when given a nil, and do the same thing
> when given what was 'none'.

All this sounds like an attempt at sounding inexperienced and
naive. Nice try, but no cigar.

In general, the documentation of the C API assumes a higher level
of nous from the reader than that of the Lua language.