diff options
author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2013-08-23 10:34:54 -0300 |
---|---|---|
committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2013-08-23 10:34:54 -0300 |
commit | 50955e27f592441a223c6267956e470f98eeb3c0 (patch) | |
tree | 4543b70e04d293c4eb09955d064f3446eb3e64a9 /lstring.c | |
parent | 33c49f7fa03cf7e3bf7bb3aa697dc567d910c661 (diff) | |
download | lua-50955e27f592441a223c6267956e470f98eeb3c0.tar.gz lua-50955e27f592441a223c6267956e470f98eeb3c0.tar.bz2 lua-50955e27f592441a223c6267956e470f98eeb3c0.zip |
C functions and strings now go to the local list; first version
of the local collector
Diffstat (limited to 'lstring.c')
-rw-r--r-- | lstring.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: lstring.c,v 2.29 2013/08/21 19:21:16 roberto Exp roberto $ | 2 | ** $Id: lstring.c,v 2.30 2013/08/22 15:21:48 roberto Exp roberto $ |
3 | ** String table (keeps all strings handled by Lua) | 3 | ** String table (keeps all strings handled by Lua) |
4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
5 | */ | 5 | */ |
@@ -106,7 +106,7 @@ static TString *createstrobj (lua_State *L, const char *str, size_t l, | |||
106 | TString *ts; | 106 | TString *ts; |
107 | size_t totalsize; /* total size of TString object */ | 107 | size_t totalsize; /* total size of TString object */ |
108 | totalsize = sizeof(TString) + ((l + 1) * sizeof(char)); | 108 | totalsize = sizeof(TString) + ((l + 1) * sizeof(char)); |
109 | ts = &luaC_newobj(L, tag, totalsize, NULL, 0)->ts; | 109 | ts = &luaC_newobj(L, tag, totalsize, &G(L)->localgc, 0)->ts; |
110 | ts->tsv.len = l; | 110 | ts->tsv.len = l; |
111 | ts->tsv.hash = h; | 111 | ts->tsv.hash = h; |
112 | ts->tsv.extra = 0; | 112 | ts->tsv.extra = 0; |