[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Iterating weak tables in Lua 5.1?
- From: Roberto Ierusalimschy <roberto@...>
- Date: Thu, 02 Dec 2004 16:38:24 -0200
> Should I change the metatable on the table from weak to non-weak before
> iterating?
No. Actually, it is not a good idea to change the weakness of a table.
On the other hand, I think I was wrong saying "It is always dangerous to
iterate a weak table." Maybe it is difficult to implement correctly :)
But it should be safe to iterate weak tables.
-- Roberto