lua-users home
lua-l archive

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

Stockdale, Daire, SOE wrote:
luaopen_string luaopen_table

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