greent refactoring
This commit is contained in:
@@ -48,9 +48,11 @@ end
|
|||||||
do
|
do
|
||||||
local mt = {__metatable=false, __newindex=nop}
|
local mt = {__metatable=false, __newindex=nop}
|
||||||
function mt:__sub(table)
|
function mt:__sub(table)
|
||||||
return setmetatable(T, O('__metatable', false, '__newindex', nop, '__index', table))
|
local proxy = setmetatable(T, O('__metatable', false, '__newindex', nop, '__index', table))
|
||||||
|
self[proxy] = table
|
||||||
|
return proxy
|
||||||
end
|
end
|
||||||
function M.wrapper()
|
function M.wrapper() -- TODO replace index function
|
||||||
return setmetatable(T, mt)
|
return setmetatable(T, mt)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
Reference in New Issue
Block a user