lua-users home
lua-l archive

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


> Specifically, ll_loadlib relies on
> registry[&CLIBS], where &CLIBS is a lightuserdata with the address of a
> static var. If there are multiple copies of the interpreter and you call
> require or loadlib from one other than the one that created the state,
> it'll end up calling lua_getfield on a nil value, which will throw an
> error.

The first thing that luaopen_package does is to create an entry
registry[&CLIBS].