diff options
author | Hans Hagen <pragma@wxs.nl> | 2017-03-01 13:51:17 +0100 |
---|---|---|
committer | Context Git Mirror Bot <phg42.2a@gmail.com> | 2017-03-01 13:51:17 +0100 |
commit | 0da55392b876cef55845157c4bfb8244d84c6450 (patch) | |
tree | a050eef10e2790e286b94dcfeae1aacc657b025b /tex/context/base/mkiv/util-lib.lua | |
parent | a616b343d8dfe81008c9e8aee253cf31f088f35b (diff) | |
download | context-0da55392b876cef55845157c4bfb8244d84c6450.tar.gz |
2017-03-01 13:47:00
Diffstat (limited to 'tex/context/base/mkiv/util-lib.lua')
-rw-r--r-- | tex/context/base/mkiv/util-lib.lua | 22 |
1 files changed, 14 insertions, 8 deletions
diff --git a/tex/context/base/mkiv/util-lib.lua b/tex/context/base/mkiv/util-lib.lua index e9a968228..98c417b8e 100644 --- a/tex/context/base/mkiv/util-lib.lua +++ b/tex/context/base/mkiv/util-lib.lua @@ -327,15 +327,21 @@ We use the same lookup logic for ffi loading. trackers.register("resolvers.ffilib", function(v) trace_ffilib = v end) + local function locateindeed(name) + local message, library = pcall(savedffiload,removesuffix(name)) + if type(library) == "userdata" then + return library + else + return false + end + end + function ffilib(required,version) - return locate(required,version,trace_ffilib,report_ffilib,function(name) - local message, library = pcall(savedffiload,removesuffix(name)) - if type(library) == "userdata" then - return message, library - else - return message, false - end - end) + if version == "system" then + return locateindeed(name) + else + return locate(required,version,trace_ffilib,report_ffilib,locateindeed) + end end function ffi.load(name) |