mirror of https://github.com/rusefi/lua.git
reserve one more bit for GC
This commit is contained in:
parent
88c9bf99de
commit
5023aaee0a
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
** $Id: lstring.c,v 1.1 2001/11/29 22:14:34 rieru Exp rieru $
|
||||
** $Id: lstring.c,v 1.72 2002/02/08 22:41:09 roberto Exp roberto $
|
||||
** String table (keeps all strings handled by Lua)
|
||||
** See Copyright Notice in lua.h
|
||||
*/
|
||||
|
@ -85,7 +85,7 @@ TString *luaS_newlstr (lua_State *L, const char *str, size_t l) {
|
|||
|
||||
Udata *luaS_newudata (lua_State *L, size_t s) {
|
||||
Udata *u;
|
||||
if (s & 1) s++; /* make sure size is even */
|
||||
s = (s+3) & (~(size_t)3); /* make sure size is multiple of 4 */
|
||||
u = cast(Udata *, luaM_malloc(L, sizeudata(s)));
|
||||
u->uv.len = s;
|
||||
u->uv.metatable = hvalue(defaultmeta(L));
|
||||
|
|
Loading…
Reference in New Issue