[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Checking whether a shared library has been loaded
- From: Roberto Ierusalimschy <roberto@...>
- Date: Mon, 9 Feb 2015 13:26:31 -0200
> 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