lua深拷贝
function CopyTable(tab) function _copy(obj) if type(obj) ~= "table" then return obj end local new_table = {} for k, v in pairs(obj) do new_table[_copy(k)] = _copy(v) end return setmetatable(new_table, getmetatable(obj)) end return _copy(tab) end