diff options
author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2014-07-21 13:02:10 -0300 |
---|---|---|
committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2014-07-21 13:02:10 -0300 |
commit | 17ee57f8e022be330d4c9de3754d7455f46a851d (patch) | |
tree | c18cbd9403686ec6cb26dc080b01ba38df7a1bcf /lstring.c | |
parent | 3c6d0aaa7d07de2cf24d09195b6678abbfee2268 (diff) | |
download | lua-17ee57f8e022be330d4c9de3754d7455f46a851d.tar.gz lua-17ee57f8e022be330d4c9de3754d7455f46a851d.tar.bz2 lua-17ee57f8e022be330d4c9de3754d7455f46a851d.zip |
'iswhite' and related macros now can work directly on any object
(no need to convert to 'GCObject')
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.42 2014/07/18 13:36:14 roberto Exp roberto $ | 2 | ** $Id: lstring.c,v 2.43 2014/07/18 14:46:47 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->len && | 126 | if (l == ts->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, ts)) /* dead (but not collected yet)? */ |
130 | changewhite(obj2gco(ts)); /* resurrect it */ | 130 | changewhite(ts); /* resurrect it */ |
131 | return ts; | 131 | return ts; |
132 | } | 132 | } |
133 | } | 133 | } |