From d8f37bf42a3dc05bf3b6f1c658ee1024116abcf2 Mon Sep 17 00:00:00 2001 From: Roberto Ierusalimschy Date: Tue, 17 Jul 2001 14:54:46 -0300 Subject: weakregistry has its keys weak, too --- lstate.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lstate.c b/lstate.c index 6c2c4c17..90b395d8 100644 --- 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); -- cgit v1.2.3-55-g6feb