lua-users home
lua-l archive

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


> > No record is kept of anything loaded with "package.loadlib".
> 
> 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".

Ah, Lua 5.3 replaced _CLIBS by an anonymous table whose key is a userdata.
_CLIBS is used for cleanup. It is an implementation detail and so is not
documented in the manual. So, yes, "package.loadlib" does record which
shared libraries have been loaded. See the first lines of luaopen_package:
	http://www.lua.org/source/5.3/loadlib.c.html#luaopen_package
	http://www.lua.org/source/5.2/loadlib.c.html#luaopen_package