diff options
author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2003-11-17 17:50:05 -0200 |
---|---|---|
committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2003-11-17 17:50:05 -0200 |
commit | ab7d9bfd0c38f1dd8eda40ae3c1f1c686564a92d (patch) | |
tree | e7f5231cc02b89b2507ad846d5d547e35e9c4153 /lstring.c | |
parent | 921b1723e2fddde0382143b28b5be3b7128204b8 (diff) | |
download | lua-ab7d9bfd0c38f1dd8eda40ae3c1f1c686564a92d.tar.gz lua-ab7d9bfd0c38f1dd8eda40ae3c1f1c686564a92d.tar.bz2 lua-ab7d9bfd0c38f1dd8eda40ae3c1f1c686564a92d.zip |
cleaner code for manipulation of `marked' field
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 1.78 2002/12/04 17:38:31 roberto Exp roberto $ | 2 | ** $Id: lstring.c,v 1.79 2003/04/28 19:26:16 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 | */ |
@@ -91,7 +91,7 @@ TString *luaS_newlstr (lua_State *L, const char *str, size_t l) { | |||
91 | Udata *luaS_newudata (lua_State *L, size_t s) { | 91 | Udata *luaS_newudata (lua_State *L, size_t s) { |
92 | Udata *u; | 92 | Udata *u; |
93 | u = cast(Udata *, luaM_malloc(L, sizeudata(s))); | 93 | u = cast(Udata *, luaM_malloc(L, sizeudata(s))); |
94 | u->uv.marked = (1<<1); /* is not finalized */ | 94 | u->uv.marked = 0; /* is not finalized */ |
95 | u->uv.tt = LUA_TUSERDATA; | 95 | u->uv.tt = LUA_TUSERDATA; |
96 | u->uv.len = s; | 96 | u->uv.len = s; |
97 | u->uv.metatable = hvalue(defaultmeta(L)); | 97 | u->uv.metatable = hvalue(defaultmeta(L)); |