summaryrefslogtreecommitdiff
path: root/lgc.c
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>2001-01-29 17:34:02 -0200
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>2001-01-29 17:34:02 -0200
commit63a822c8e199918c54e325cbc8696ed04071aba8 (patch)
tree430e1b2fe1ffafb712bd712b5b625a18afaa953d /lgc.c
parent09def5da4440a5a91c2721f495bd9c3df1081874 (diff)
downloadlua-63a822c8e199918c54e325cbc8696ed04071aba8.tar.gz
lua-63a822c8e199918c54e325cbc8696ed04071aba8.tar.bz2
lua-63a822c8e199918c54e325cbc8696ed04071aba8.zip
all boxed types start with their tags
Diffstat (limited to 'lgc.c')
-rw-r--r--lgc.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/lgc.c b/lgc.c
index c6c85f18..182f6048 100644
--- a/lgc.c
+++ b/lgc.c
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: lgc.c,v 1.81 2001/01/26 14:16:24 roberto Exp roberto $ 2** $Id: lgc.c,v 1.82 2001/01/29 17:16:58 roberto Exp roberto $
3** Garbage Collector 3** Garbage Collector
4** See Copyright Notice in lua.h 4** See Copyright Notice in lua.h
5*/ 5*/
@@ -66,6 +66,8 @@ static void marktable (GCState *st, Hash *h) {
66 66
67 67
68static void markobject (GCState *st, TObject *o) { 68static void markobject (GCState *st, TObject *o) {
69 lua_assert(ttype(o) == LUA_TNUMBER ||
70 ttype(o) == ((TValue *)(o->value.v))->ttype);
69 switch (ttype(o)) { 71 switch (ttype(o)) {
70 case LUA_TUSERDATA: case LUA_TSTRING: 72 case LUA_TUSERDATA: case LUA_TSTRING:
71 strmark(tsvalue(o)); 73 strmark(tsvalue(o));