Lua深拷贝
local function Copy(i_s,v_s,e)
if v_s==nil or type(v_s)~="table" then
e[i_s]=v_s
return
end
e[i_s]={}
for i,v in pairs(v_s)do
Copy(i,v,e[i_s])
end
end
function Deep_Copy(e)
if e==nil or type(e)~="table" then
return nil
end
local out={}
for i,v in pairs(e) do
Copy(i,v,out)
end
return out
end