lua

A copy of the Lua development repository
Log | Files | Refs | README

commit d8f37bf42a3dc05bf3b6f1c658ee1024116abcf2
parent a598804a0435a53538c8ab6c74182347b797ae9b
Author: Roberto Ierusalimschy <roberto@inf.puc-rio.br>
Date:   Tue, 17 Jul 2001 14:54:24 -0300

weakregistry has its keys weak, too

Diffstat:
Mlstate.c | 5+++--
1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/lstate.c b/lstate.c @@ -1,5 +1,5 @@ /* -** $Id: lstate.c,v 1.64 2001/06/12 18:43:13 roberto Exp roberto $ +** $Id: lstate.c,v 1.65 2001/06/21 16:41:34 roberto Exp roberto $ ** Global State ** See Copyright Notice in lua.h */ @@ -67,7 +67,8 @@ static void f_luaopen (lua_State *L, void *ud) { G(L)->type2tag = luaH_new(L, 10); G(L)->registry = luaH_new(L, 0); G(L)->weakregistry = luaH_new(L, 0); - G(L)->weakregistry->weakmode = LUA_WEAK_VALUE; /* make weakregistry weak */ + /* make weakregistry weak */ + G(L)->weakregistry->weakmode = LUA_WEAK_KEY | LUA_WEAK_VALUE; luaS_resize(L, MINPOWER2); luaX_init(L); luaT_init(L);