diff options
Diffstat (limited to 'tex/context/base/l-os.lua')
-rw-r--r-- | tex/context/base/l-os.lua | 19 |
1 files changed, 4 insertions, 15 deletions
diff --git a/tex/context/base/l-os.lua b/tex/context/base/l-os.lua index 1e7c91757..08d0473bc 100644 --- a/tex/context/base/l-os.lua +++ b/tex/context/base/l-os.lua @@ -193,21 +193,10 @@ os.resolvers = os.resolvers or { } -- will become private local resolvers = os.resolvers -local osmt = getmetatable(os) or { __index = function(t,k) - local v = function() - print(format("function os.%s in namespace is undefined")) - end - t[k] = v - return v -end } -- maybe nil - -local osix = osmt.__index - -osmt.__index = function(t,k) - return (resolvers[k] or osix)(t,k) -end - -setmetatable(os,osmt) +setmetatable(os, { __index = function(t,k) + local r = resolvers[k] + return r and r(t,k) or nil -- no memoize +end }) -- we can use HOSTTYPE on some platforms |