package.nounload
package.nounload
is a table whose keys are module names, that should not be deleted from package.loaded
when macros are unloaded or reloaded (operations MCTL_LOADALL
, lm:load
, lm:unload
).
- This table is created automatically by LuaMacro plugin.
- A use case: place in this table names of modules using LuaJIT FFI that call
ffi.cdef
.
For example, after executing
package.nounload.mylib = true
the module mylib
will not be removed from package.loaded
during macro unload/reload operations.