diff options
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; |