lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


Alexey Zaytsev wrote:
setmetatable(t, {
 __ref = function(table)
   local tmp = {}
   for i, j in pairs(table) do
     tmp[i] = j
   end
   return tmp
 end
}) <- make "=" behave like copy.

Ask yourself "Why do I need such feature?" and tell us the answer. We will suggest you standard solution.

--
E.V.E