diff options
author | Marius <mariausol@gmail.com> | 2013-04-11 21:00:16 +0300 |
---|---|---|
committer | Marius <mariausol@gmail.com> | 2013-04-11 21:00:16 +0300 |
commit | cd2871a839077bd004f75c08f17ed7bc4bdec183 (patch) | |
tree | f80c9b92855f584a99a67b2cddf727653e9127cf /tex/context/base/util-lib.lua | |
parent | c8623a0cf0f9ea78aa7fafb089402afb78675742 (diff) | |
download | context-cd2871a839077bd004f75c08f17ed7bc4bdec183.tar.gz |
beta 2013.04.11 19:49
Diffstat (limited to 'tex/context/base/util-lib.lua')
-rw-r--r-- | tex/context/base/util-lib.lua | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/tex/context/base/util-lib.lua b/tex/context/base/util-lib.lua index 601f2fb1d..7d43e6c97 100644 --- a/tex/context/base/util-lib.lua +++ b/tex/context/base/util-lib.lua @@ -201,10 +201,14 @@ local function requireswiglib(required,version) if trace_swiglib then report_swiglib("found: %a",found_library) end - library = package.loadlib(found_library,"luaopen_" .. required_base) - if type(library) == "function" then + local message = nil + local opener = "luaopen_" .. required_base + library, message = package.loadlib(found_library,opener) + local libtype = type(library) + if libtype == "function" then library = library() else + report_swiglib("load error: %a returns %a, message %a",opener,libtype,message or "no message") library = false end dir.pop() |