From 63a822c8e199918c54e325cbc8696ed04071aba8 Mon Sep 17 00:00:00 2001 From: Roberto Ierusalimschy Date: Mon, 29 Jan 2001 17:34:02 -0200 Subject: all boxed types start with their tags --- lgc.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'lgc.c') diff --git a/lgc.c b/lgc.c index c6c85f18..182f6048 100644 --- a/lgc.c +++ b/lgc.c @@ -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)); -- cgit v1.2.3-55-g6feb