[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: lua_next() crashing on former LUA_TNONE arguments
- From: Dirk Laurie <dirk.laurie@...>
- Date: Wed, 13 Dec 2017 22:58:47 +0200
2017-12-13 15:33 GMT+02:00 Viacheslav Usov <firstname.lastname@example.org>:
> On Wed, Dec 13, 2017 at 1:43 PM, Roberto Ierusalimschy
> <email@example.com> 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
> ... 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.