all boxed types start with their tags

This commit is contained in:
Roberto Ierusalimschy
2001-01-29 17:34:02 -02:00
parent 09def5da44
commit 63a822c8e1
7 changed files with 36 additions and 13 deletions

4
lgc.c
View File

@@ -1,5 +1,5 @@
/*
** $Id: lgc.c,v 1.81 2001/01/26 14:16:24 roberto Exp roberto $
** $Id: lgc.c,v 1.82 2001/01/29 17:16:58 roberto Exp roberto $
** Garbage Collector
** See Copyright Notice in lua.h
*/
@@ -66,6 +66,8 @@ static void marktable (GCState *st, Hash *h) {
static void markobject (GCState *st, TObject *o) {
lua_assert(ttype(o) == LUA_TNUMBER ||
ttype(o) == ((TValue *)(o->value.v))->ttype);
switch (ttype(o)) {
case LUA_TUSERDATA: case LUA_TSTRING:
strmark(tsvalue(o));