C functions and strings now go to the local list; first version

of the local collector
This commit is contained in:
Roberto Ierusalimschy
2013-08-23 10:34:54 -03:00
parent 33c49f7fa0
commit 50955e27f5
6 changed files with 107 additions and 15 deletions

View File

@@ -1,5 +1,5 @@
/*
** $Id: lstring.c,v 2.29 2013/08/21 19:21:16 roberto Exp roberto $
** $Id: lstring.c,v 2.30 2013/08/22 15:21:48 roberto Exp roberto $
** String table (keeps all strings handled by Lua)
** See Copyright Notice in lua.h
*/
@@ -106,7 +106,7 @@ static TString *createstrobj (lua_State *L, const char *str, size_t l,
TString *ts;
size_t totalsize; /* total size of TString object */
totalsize = sizeof(TString) + ((l + 1) * sizeof(char));
ts = &luaC_newobj(L, tag, totalsize, NULL, 0)->ts;
ts = &luaC_newobj(L, tag, totalsize, &G(L)->localgc, 0)->ts;
ts->tsv.len = l;
ts->tsv.hash = h;
ts->tsv.extra = 0;