開啟主選單
首頁
隨機
登入
設定
關於Akarin
免責聲明
Akarin
搜尋
變更
← 較舊編輯
較新編輯 →
模块:No globals
(檢視原始碼)
於 2020年6月1日 (一) 08:55 的修訂
移除 141 位元組
、
2020年6月1日 (一) 08:55
小
导入1个版本:受托导入数个模板;本次导入Infobox,来源为ZhWP
行 2:
行 2:
function mt.__index (t, k)
function mt.__index (t, k)
if k ~= 'arg' then
if k ~= 'arg' then
−
-- perf optimization here and below: do not load Module:TNT unless there is an
error
+
error('
尝试读取空全局变量:
' .
.
tostring(k), 2)
−
error(require
('
Module:TNT
'
)
.
format('I18n/No globals', 'err-read',
tostring(k
)
), 2)
end
end
return nil
return nil
行 9:
行 8:
function mt.__newindex(t, k, v)
function mt.__newindex(t, k, v)
if k ~= 'arg' then
if k ~= 'arg' then
−
error
(require
('
Module:TNT
'
)
.
format('I18n/No globals', 'err-write',
tostring(k
)
), 2)
+
error('
尝试写入全局变量:
' .
.
tostring(k), 2)
end
end
rawset(t, k, v)
rawset(t, k, v)
end
end
setmetatable(_G, mt)
setmetatable(_G, mt)
One-Six
161
次編輯