summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/context/base/util-sto.lua
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/tex/context/base/util-sto.lua')
-rw-r--r--Master/texmf-dist/tex/context/base/util-sto.lua24
1 files changed, 14 insertions, 10 deletions
diff --git a/Master/texmf-dist/tex/context/base/util-sto.lua b/Master/texmf-dist/tex/context/base/util-sto.lua
index f4521c91fce..42ee6cf003b 100644
--- a/Master/texmf-dist/tex/context/base/util-sto.lua
+++ b/Master/texmf-dist/tex/context/base/util-sto.lua
@@ -14,8 +14,8 @@ local storage = utilities.storage
function storage.mark(t)
if not t then
- texio.write_nl("fatal error: storage '%s' cannot be marked",t)
- os.exit()
+ texio.write_nl("fatal error: storage cannot be marked")
+ return -- os.exit()
end
local m = getmetatable(t)
if not m then
@@ -44,8 +44,8 @@ end
function storage.checked(t)
if not t then
- texio.write_nl("fatal error: storage '%s' has not been allocated",t)
- os.exit()
+ texio.write_nl("fatal error: storage has not been allocated")
+ return -- os.exit()
end
return t
end
@@ -98,13 +98,13 @@ end
-- table namespace ?
-local function f_empty () return "" end -- t,k
-local function f_self (t,k) t[k] = k return k end
-local function f_ignore() end -- t,k,v
+local function f_empty () return "" end -- t,k
+local function f_self (t,k) t[k] = k return k end
+local function f_ignore() end -- t,k,v
-local t_empty = { __index = empty }
-local t_self = { __index = self }
-local t_ignore = { __newindex = ignore }
+local t_empty = { __index = f_empty }
+local t_self = { __index = f_self }
+local t_ignore = { __newindex = f_ignore }
function table.setmetatableindex(t,f)
local m = getmetatable(t)
@@ -125,6 +125,7 @@ function table.setmetatableindex(t,f)
setmetatable(t,{ __index = f })
end
end
+ return t
end
function table.setmetatablenewindex(t,f)
@@ -142,6 +143,7 @@ function table.setmetatablenewindex(t,f)
setmetatable(t,{ __newindex = f })
end
end
+ return t
end
function table.setmetatablecall(t,f)
@@ -151,6 +153,7 @@ function table.setmetatablecall(t,f)
else
setmetatable(t,{ __call = f })
end
+ return t
end
function table.setmetatablekey(t,key,value)
@@ -160,6 +163,7 @@ function table.setmetatablekey(t,key,value)
setmetatable(t,m)
end
m[key] = value
+ return t
end
function table.getmetatablekey(t,key,value)