[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: luaL_getn segfault
- From: Tuomo Valkonen <tuomov@...>
- Date: Tue, 29 Jul 2003 20:08:02 +0300
On Tue, Jul 29, 2003 at 01:35:58PM -0300, Roberto Ierusalimschy wrote:
> This is a type error. The result of `lua_rawgeti' is nil, right? So, if
> you apply `luaL_getn' over nil you get such error. The C API does not
> check its arguments (this is C after all ;) If you want to check this
> kind of thing, you can recompile Lua defining `api_check' (see lapi.c).
I would expect values in the _Lua stack_ to be checked. But apparently
even lua_rawgeti doesn't do it. Stupid, IMHO. Recompiling the library
with the checks enabled is not possible because I don't want users to
have to go through that process. Wasn't it better that the checks
were enabled by default and there was an option to disable them?
--
Tuomo