diff options
Diffstat (limited to 'Master/texmf-dist/tex/context/base/util-lib.lua')
-rw-r--r-- | Master/texmf-dist/tex/context/base/util-lib.lua | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/Master/texmf-dist/tex/context/base/util-lib.lua b/Master/texmf-dist/tex/context/base/util-lib.lua index 601f2fb1d9f..7d43e6c97b2 100644 --- a/Master/texmf-dist/tex/context/base/util-lib.lua +++ b/Master/texmf-dist/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() |