[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: 5.1 Crashing in luaopen_io
- From: epajarre@...
- Date: Tue, 07 Feb 2006 20:32:53 +0200
Stockdale, Daire, SOE wrote:
luaopen_string
luaopen_table
luaopen_math
luaopen_debug
luaopen_io
luaopen_package
luaopen_base
Quote from Lua 5.1 reference manual:
>These functions are declared in |lualib.h| and should not be called
directly: you must call them like any other Lua C function, e.g., by
using |lua_call|.
Are these the only C api functions subject to this special case, or must
all of the C api be accessed via the lua_call routine? The above
sentence seems to imply the latter.
AFAIK it is only these functions which need the special handling.
(and actually I think only couple of them really require it)
And yes, I also did not appreciate this change. I would have
prefered something more visible, like function name change.
Also when I was debugging this in my program, the error was not
"access through zero pointer" but "access through un-initialized
pointer" which I thought is worse debugging wise.
It is of course easy to avoid this problem by using (or copying)
the code from linit.c
Eero