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 --- lstring.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'lstring.c') diff --git a/lstring.c b/lstring.c index abc293bd..ee087e9b 100644 --- a/lstring.c +++ b/lstring.c @@ -1,5 +1,5 @@ /* -** $Id: lstring.c,v 1.51 2001/01/19 13:20:30 roberto Exp roberto $ +** $Id: lstring.c,v 1.52 2001/01/26 15:58:50 roberto Exp roberto $ ** String table (keeps all strings handled by Lua) ** See Copyright Notice in lua.h */ @@ -76,6 +76,7 @@ TString *luaS_newlstr (lua_State *L, const char *str, size_t l) { } /* not found */ ts = (TString *)luaM_malloc(L, sizestring(l)); + ts->v.ttype = LUA_TSTRING; ts->marked = 0; ts->nexthash = NULL; ts->len = l; @@ -91,6 +92,7 @@ TString *luaS_newlstr (lua_State *L, const char *str, size_t l) { TString *luaS_newudata (lua_State *L, size_t s, void *udata) { union L_UTString *uts = (union L_UTString *)luaM_malloc(L, sizeudata(s)); TString *ts = &uts->ts; + ts->v.ttype = LUA_TUSERDATA; ts->marked = 0; ts->nexthash = NULL; ts->len = s; -- cgit v1.2.3-55-g6feb