mirror of
https://github.com/rakshasa/rtorrent.git
synced 2026-10-14 13:16:17 +00:00
fix(lua): print= shadowed by native Lua print()
Trying `rc.print()` causes redirection to native global Lua `print()`, which prints to stdout. I don't see any proc of shor-circuiting `autocall_config` with global environment `_G`.
This commit is contained in:
+1
-5
@@ -31,11 +31,7 @@ function mt.__call (t, ...)
|
|||||||
return ret
|
return ret
|
||||||
end
|
end
|
||||||
function mt.__index (t, key)
|
function mt.__index (t, key)
|
||||||
ns = rawget(t, "__namestack")
|
ns = rawget(t, "__namestack") or {}
|
||||||
if ns == nil then
|
|
||||||
if _G[key] ~= nil then return _G[key] end
|
|
||||||
ns = {}
|
|
||||||
end
|
|
||||||
table.insert(ns, key)
|
table.insert(ns, key)
|
||||||
return setmetatable({__namestack=ns}, mt)
|
return setmetatable({__namestack=ns}, mt)
|
||||||
end
|
end
|
||||||
|
|||||||
Reference in New Issue
Block a user