aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>1997-03-26 19:22:41 -0300
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>1997-03-26 19:22:41 -0300
commit9e9e2ea287a24871e6e35faef52ae236bf85f8ae (patch)
treeb81438536f5580862838be56afff18897ae03075
parent03d917f229107d788df93c940d87b5908194248a (diff)
downloadlua-9e9e2ea287a24871e6e35faef52ae236bf85f8ae.tar.gz
lua-9e9e2ea287a24871e6e35faef52ae236bf85f8ae.tar.bz2
lua-9e9e2ea287a24871e6e35faef52ae236bf85f8ae.zip
BUG: must mark userdata in garbage collection.
-rw-r--r--table.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/table.c b/table.c
index c9bdafba..60c2cd42 100644
--- a/table.c
+++ b/table.c
@@ -3,7 +3,7 @@
3** Module to control static tables 3** Module to control static tables
4*/ 4*/
5 5
6char *rcs_table="$Id: table.c,v 2.62 1997/03/21 18:52:37 roberto Exp $"; 6char *rcs_table="$Id: table.c,v 2.62 1997/03/21 21:39:57 roberto Exp roberto $";
7 7
8#include "mem.h" 8#include "mem.h"
9#include "opcode.h" 9#include "opcode.h"
@@ -128,7 +128,8 @@ static char *lua_travsymbol (int (*fn)(Object *))
128*/ 128*/
129int lua_markobject (Object *o) 129int lua_markobject (Object *o)
130{/* if already marked, does not change mark value */ 130{/* if already marked, does not change mark value */
131 if (ttype(o) == LUA_T_STRING && !tsvalue(o)->marked) 131 if (ttype(o) == LUA_T_USERDATA ||
132 (ttype(o) == LUA_T_STRING && !tsvalue(o)->marked))
132 tsvalue(o)->marked = 1; 133 tsvalue(o)->marked = 1;
133 else if (ttype(o) == LUA_T_ARRAY) 134 else if (ttype(o) == LUA_T_ARRAY)
134 lua_hashmark (avalue(o)); 135 lua_hashmark (avalue(o));