diff options
author | Hans Hagen <pragma@wxs.nl> | 2020-02-16 10:59:14 +0100 |
---|---|---|
committer | Context Git Mirror Bot <phg@phi-gamma.net> | 2020-02-16 10:59:14 +0100 |
commit | 8e11d447440b44990432ac838953a8cde4ef914f (patch) | |
tree | f30b2ff2d8a10f1aff50e1522d968618a97f067c /tex/context/base/mkiv/libs-ini.lua | |
parent | 43fc66771a0c9d27cc0b7fe7a69392ea313bd0ca (diff) | |
download | context-8e11d447440b44990432ac838953a8cde4ef914f.tar.gz |
2020-02-11 16:39:00
Diffstat (limited to 'tex/context/base/mkiv/libs-ini.lua')
-rw-r--r-- | tex/context/base/mkiv/libs-ini.lua | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/tex/context/base/mkiv/libs-ini.lua b/tex/context/base/mkiv/libs-ini.lua index 2422305f0..2bac3201d 100644 --- a/tex/context/base/mkiv/libs-ini.lua +++ b/tex/context/base/mkiv/libs-ini.lua @@ -106,6 +106,8 @@ resolvers.libraries = libraries local report = logs.reporter("optional") +if optional then optional.loaded = { } end + function libraries.validoptional(name) local thelib = optional and optional[name] if not thelib then @@ -152,6 +154,21 @@ function libraries.optionalloaded(name,libnames) end end +if FFISUPPORTED and ffi and ffi.load then + + local ffiload = ffi.load + + function ffi.load(name) + local full = name and foundlibraries[name] + if full then + return ffiload(full) + else + return ffiload(name) + end + end + +end + -- local patterns = { -- "libs-imp-%s.mkxl", -- "libs-imp-%s.mklx", |