diff options
author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2001-07-17 14:54:46 -0300 |
---|---|---|
committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2001-07-17 14:54:46 -0300 |
commit | d8f37bf42a3dc05bf3b6f1c658ee1024116abcf2 (patch) | |
tree | 47d6c2517217c9b02dd32793a607911948928001 | |
parent | a598804a0435a53538c8ab6c74182347b797ae9b (diff) | |
download | lua-github-d8f37bf42a3dc05bf3b6f1c658ee1024116abcf2.tar.gz |
weakregistry has its keys weak, too
-rw-r--r-- | lstate.c | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -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); |