[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: RE: Iteration problems: Not a weak table issue
- From: "Joshua Jensen" <jjensen@...>
- Date: Thu, 2 Dec 2004 07:54:16 -0700
> > I thought it was legal to assign nil to existing keys inside a loop.
> > Are there further caveats that need to be observed in Lua 5.1?
>
> file lgc.c line 65:
>
> static void removeentry (Node *n) {
> setnilvalue(gval(n)); /* remove corresponding value ... */
> > if (iscollectable(gkey(n)))
> > setttype(gkey(n), LUA_TNONE); /* dead key; remove it */
> }
That exact code is called removekey in lgc.c in Lua 5.0.2.
Josh