summaryrefslogtreecommitdiff
path: root/lualibs-lua.lua
diff options
context:
space:
mode:
Diffstat (limited to 'lualibs-lua.lua')
-rw-r--r--lualibs-lua.lua13
1 files changed, 12 insertions, 1 deletions
diff --git a/lualibs-lua.lua b/lualibs-lua.lua
index 538c65d..5181640 100644
--- a/lualibs-lua.lua
+++ b/lualibs-lua.lua
@@ -356,7 +356,7 @@ end
local function notloaded(name)
if helpers.trace then
- helpers.report("? unable to locate library '%s'",name)
+ helpers.report("unable to locate library '%s'",name)
end
end
@@ -391,3 +391,14 @@ function helpers.loaded(name)
end
return notloaded(name)
end
+
+function helpers.unload(name)
+ if helpers.trace then
+ if package.loaded[name] then
+ helpers.report("unloading library '%s', %s",name,"done")
+ else
+ helpers.report("unloading library '%s', %s",name,"not loaded")
+ end
+ end
+ package.loaded[name] = nil
+end