Prevent new
calls that won't work as expected
This commit is contained in:
parent
297e6e4996
commit
93b63a5831
@ -41,6 +41,7 @@ function mknew(tt)
|
|||||||
local mt,oldinit,more = {__index=tt},tt.superinit,rawget(tt, "init")
|
local mt,oldinit,more = {__index=tt},tt.superinit,rawget(tt, "init")
|
||||||
tt.new=function(ret)
|
tt.new=function(ret)
|
||||||
if(not ret) ret = {}
|
if(not ret) ret = {}
|
||||||
|
ret.new = false
|
||||||
setmetatable(ret, mt)
|
setmetatable(ret, mt)
|
||||||
if(oldinit) oldinit(ret)
|
if(oldinit) oldinit(ret)
|
||||||
if (more) more(ret)
|
if (more) more(ret)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user