lua-users home
lua-l archive

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

Peter Cawley wrote:
3: The luaopen_* methods cannot be called directly from C; they should
be called as Lua C functions like so:
lua_pushcfunction(L, luaopen_io);
I had this issue myself a week ago when I finally upgraded from 5.0 to 5.1, and it took a bit of digging in the manual to figure out why it was dying. Would it be worthwhile to change the error message to include an explanation of the likely cause? Even if it were just a reference to a manual page, or something implying that an internal Lua function was being incorrectly called from C, that would prevent confusion (and wasted time, either my time digging through the manual, or the time of folks on the list answering questions that wouldn't need to be asked).

Just a thought,