lua-users home
lua-l archive

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


>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.

>The 5(alpha) did completely regenerate the table of the library
>in loadlib, but 5(beta) reuses the table, and just
>adds items to it. In some sense I find the alpha behaviour
>cleaner.

This is to allow things like opening a library directly into the global table
or or library appending things to another (eg. system-dependent functions
to the "os" library).
--lhf