lua-users home
lua-l archive

Prototype-based objects bug-fix

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


The definition of clone is wrong, because it doesn't keep the tag of the
object table; you can forget about curry and instead use
-- clone: Make a shallow copy of a table, including any tag
-- t: table
-- returns
-- u: copy of table
function clone(t)
 return merge(t, {})
end
-- 
http://sc3d.org/rrt/ | Analogy is a midwife, identity a murderer

AltStyle によって変換されたページ (->オリジナル) /