lua-users home
lua-l archive

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


Luiz Henrique de Figueiredo wrote:
luaL_openlib seems to leave one item to the stack (the table
containing the library), and functions like lua_baselibopen,
lua_mathlibopen and lua_tablibopen leave the table
on stack.


This is an oversight. lua_*libopen should return 1, not 0.



I guess documenting it is the most important thing, if the
current behaviour is kept. It sort of breaks compatibility
though. Or am I missing something on how the return value
should help? (I mean the return value works if the function
is called from lua, but if you are calling it from the
host program...)


		Eero