diff options
author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2013-08-27 17:04:00 -0300 |
---|---|---|
committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2013-08-27 17:04:00 -0300 |
commit | 90972ff136f310f00b04d9e9837ee0640983b743 (patch) | |
tree | 5362eb13fd6ab3d314bc9baefe3d73b1f0e02fad /lstring.c | |
parent | af35c7f398e8149b5f2481b63b399674e4ecdf7e (diff) | |
download | lua-90972ff136f310f00b04d9e9837ee0640983b743.tar.gz lua-90972ff136f310f00b04d9e9837ee0640983b743.tar.bz2 lua-90972ff136f310f00b04d9e9837ee0640983b743.zip |
LOCALBLACK changed to LOCALMARK and used also to control whether object
is in 'localgc' list + luaC_newobj by default puts object in 'localgc'
list
Diffstat (limited to 'lstring.c')
-rw-r--r-- | lstring.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: lstring.c,v 2.30 2013/08/22 15:21:48 roberto Exp roberto $ | 2 | ** $Id: lstring.c,v 2.31 2013/08/23 13:34:54 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, &G(L)->localgc, 0)->ts; | 109 | ts = &luaC_newobj(L, tag, totalsize, NULL, 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; |
@@ -213,7 +213,7 @@ Udata *luaS_newudata (lua_State *L, size_t s, Table *e) { | |||
213 | Udata *u; | 213 | Udata *u; |
214 | if (s > MAX_SIZE - sizeof(Udata)) | 214 | if (s > MAX_SIZE - sizeof(Udata)) |
215 | luaM_toobig(L); | 215 | luaM_toobig(L); |
216 | u = &luaC_newobj(L, LUA_TUSERDATA, sizeof(Udata) + s, NULL, 0)->u; | 216 | u = &luaC_newobj(L, LUA_TUSERDATA, sizeof(Udata) + s, &G(L)->allgc, 0)->u; |
217 | u->uv.len = s; | 217 | u->uv.len = s; |
218 | u->uv.metatable = NULL; | 218 | u->uv.metatable = NULL; |
219 | u->uv.env = e; | 219 | u->uv.env = e; |