diff options
| author | Philipp Gesang <phg42.2a@gmail.com> | 2013-04-14 23:03:58 +0200 | 
|---|---|---|
| committer | Philipp Gesang <phg42.2a@gmail.com> | 2013-04-14 23:03:58 +0200 | 
| commit | 7b2ac38cf888ed3269b5e3ef72a80fa4ae12841f (patch) | |
| tree | 1a012fd7c9e996348091f4b7f6dad35f02df2490 /lualibs-lua.lua | |
| parent | 9d3e292ead8e354c836d0c4dcd25e0b4aa03486c (diff) | |
| download | lualibs-7b2ac38cf888ed3269b5e3ef72a80fa4ae12841f.tar.gz | |
import changes from Context 2013.04.14 16:51
Diffstat (limited to 'lualibs-lua.lua')
| -rw-r--r-- | lualibs-lua.lua | 13 | 
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 | 
