lua-users home
lua-l archive

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


> The following session strongly seems to suggest that an
> undocumented feature of Lua 5.3, not present in Lua 5.2,
> is a table in the registry keyed by the filenames of libraries
> loaded with "package.loadlib".

Both Lua 5.2 and 5.3 (and older versions, too) keep track of all
loaded C modules, to unload them when the state is closed. Lua 5.1
and 5.2.0 kept them directly in the registry (indexed by something
like "LOADLIB: <libname>"). Due to a bug [1], it now keeps them
in a separate table (indexed by a dummy address in the registry).
(That table is present in Lua 5.2 too, except in 5.2.0, but there
it is indexed in the registry by the string "_CLIBS".)


[1] http://www.lua.org/bugs.html#5.2.0-3

-- Roberto