lua-users home
lua-l archive

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


Sorry, I should correct a mistyping in the previous post, in case anyone
wants to try this. Also, " require(name) " constructs part of the key to the
registry in the form " ./name.so " for a library in the local directory.
So the reload function  should read:

function req(name)
package.unload('./'..name..'.so')
package.loadlib('./'..name..'.so','_luaopen_'..name)()
end

This will now correctly reload a local .so file loaded with "require".

Also, I've been told there's something called ipython which can do
dynamic reloading of C modules.  Actually, ipython looks pretty good,
it has the ability to construct "commands", a logging facility, etc.
But lua is better, especially for someone who enjoys reinventing wheels.

rob