diff options
author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2013-09-11 09:26:14 -0300 |
---|---|---|
committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2013-09-11 09:26:14 -0300 |
commit | 115087344797d0aafb23f4fe5b902fdebd2c3310 (patch) | |
tree | 732c83cee53b9d67b83cebfc2e5debd30d48eeed /lstring.c | |
parent | 79ab21be90792c00da98e5ec3d55c8a082c6e6de (diff) | |
download | lua-115087344797d0aafb23f4fe5b902fdebd2c3310.tar.gz lua-115087344797d0aafb23f4fe5b902fdebd2c3310.tar.bz2 lua-115087344797d0aafb23f4fe5b902fdebd2c3310.zip |
'luaC_newobj' does not handle special cases; only special case
now is threads, which do not use 'luaC_newobj' anymore.
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.33 2013/08/28 18:30:26 roberto Exp roberto $ | 2 | ** $Id: lstring.c,v 2.34 2013/09/05 19:31:49 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 | */ |
@@ -101,7 +101,7 @@ static TString *createstrobj (lua_State *L, const char *str, size_t l, | |||
101 | TString *ts; | 101 | TString *ts; |
102 | size_t totalsize; /* total size of TString object */ | 102 | size_t totalsize; /* total size of TString object */ |
103 | totalsize = sizeof(TString) + ((l + 1) * sizeof(char)); | 103 | totalsize = sizeof(TString) + ((l + 1) * sizeof(char)); |
104 | ts = &luaC_newobj(L, tag, totalsize, NULL, 0)->ts; | 104 | ts = &luaC_newobj(L, tag, totalsize)->ts; |
105 | ts->tsv.len = l; | 105 | ts->tsv.len = l; |
106 | ts->tsv.hash = h; | 106 | ts->tsv.hash = h; |
107 | ts->tsv.extra = 0; | 107 | ts->tsv.extra = 0; |
@@ -178,7 +178,7 @@ Udata *luaS_newudata (lua_State *L, size_t s, Table *e) { | |||
178 | Udata *u; | 178 | Udata *u; |
179 | if (s > MAX_SIZE - sizeof(Udata)) | 179 | if (s > MAX_SIZE - sizeof(Udata)) |
180 | luaM_toobig(L); | 180 | luaM_toobig(L); |
181 | u = &luaC_newobj(L, LUA_TUSERDATA, sizeof(Udata) + s, NULL, 0)->u; | 181 | u = &luaC_newobj(L, LUA_TUSERDATA, sizeof(Udata) + s)->u; |
182 | u->uv.len = s; | 182 | u->uv.len = s; |
183 | u->uv.metatable = NULL; | 183 | u->uv.metatable = NULL; |
184 | u->uv.env = e; | 184 | u->uv.env = e; |