lua-users home
lua-l archive

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


> This will require some support in C. Probably the best way
> to do this would be to have a GC method associated with the
> namespace table. While we are at it, we might create a _LOADED
> table specific to loadlib, just like require has one. I don't
> like using the same table for both require and loadlib. Perhaps
> _LOADLIB, with weak values.

I don't know about other OSs but GetModuleHandle("xxx.dll") can be used
under Windows to determine whether a library is already loaded (statically
or dynamically). This mechanism is not necessarily a replacement of _LOADLIB
but could help.

Marius