aboutsummaryrefslogtreecommitdiff
path: root/lstring.c
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>2014-07-18 09:17:54 -0300
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>2014-07-18 09:17:54 -0300
commit56137d58ff7abe8cb22ee3469366e08888c84f28 (patch)
tree6769e3c2403a69cf3f0d6dbf6fb4acb7442367e0 /lstring.c
parent9aec500a2691d2b13c307d143868c8a4fab33220 (diff)
downloadlua-56137d58ff7abe8cb22ee3469366e08888c84f28.tar.gz
lua-56137d58ff7abe8cb22ee3469366e08888c84f28.tar.bz2
lua-56137d58ff7abe8cb22ee3469366e08888c84f28.zip
added check for conversion 'obj2gco' (and corrections for small
problems detected by this check)
Diffstat (limited to 'lstring.c')
-rw-r--r--lstring.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/lstring.c b/lstring.c
index 55d55013..fd4351ab 100644
--- a/lstring.c
+++ b/lstring.c
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: lstring.c,v 2.39 2014/04/02 16:44:42 roberto Exp roberto $ 2** $Id: lstring.c,v 2.40 2014/06/18 22:59:29 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*/
@@ -126,8 +126,8 @@ static TString *internshrstr (lua_State *L, const char *str, size_t l) {
126 if (l == ts->tsv.len && 126 if (l == ts->tsv.len &&
127 (memcmp(str, getstr(ts), l * sizeof(char)) == 0)) { 127 (memcmp(str, getstr(ts), l * sizeof(char)) == 0)) {
128 /* found! */ 128 /* found! */
129 if (isdead(g, obj2gco(ts))) /* dead (but not collected yet)? */ 129 if (isdead(g, ts2gco(ts))) /* dead (but not collected yet)? */
130 changewhite(obj2gco(ts)); /* resurrect it */ 130 changewhite(ts2gco(ts)); /* resurrect it */
131 return ts; 131 return ts;
132 } 132 }
133 } 133 }