From d11a1200ed28c6e0058990a621d7404f821ac7fd Mon Sep 17 00:00:00 2001 From: Hans Hagen Date: Mon, 19 Jun 2017 15:50:29 +0200 Subject: 2017-06-19 15:35:00 --- tex/context/base/mkiv/util-lib.lua | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) (limited to 'tex/context/base/mkiv/util-lib.lua') diff --git a/tex/context/base/mkiv/util-lib.lua b/tex/context/base/mkiv/util-lib.lua index 817ac2753..ab26afe46 100644 --- a/tex/context/base/mkiv/util-lib.lua +++ b/tex/context/base/mkiv/util-lib.lua @@ -229,10 +229,12 @@ local function locate(required,version,trace,report,action) report("load error: message %a, library %a",tostring(message or "unknown"),found_library or "no library") end end - if not library then - report("unknown library: %a",required) - elseif trace then - report("stored library: %a",required) + if trace then + if not library then + report("unknown library: %a",required) + else + report("stored library: %a",required) + end end return library end @@ -341,6 +343,8 @@ We use the same lookup logic for ffi loading. local trace_ffilib = false local savedffiload = ffi.load + -- ffi.savedload = savedffiload + trackers.register("resolvers.ffilib", function(v) trace_ffilib = v end) local function locateindeed(name) @@ -366,10 +370,11 @@ We use the same lookup logic for ffi loading. local library = ffilib(name) if type(library) == "userdata" then return library - else + end + if trace_ffilib then report_ffilib("trying to load %a using normal loader",name) - return savedffiload(name) end + return savedffiload(name) end end -- cgit v1.2.3