diff options
| author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2013-09-11 11:56:15 -0300 |
|---|---|---|
| committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2013-09-11 11:56:15 -0300 |
| commit | 6ca7b63bce0ce4f1abf418dead256d3e51e41644 (patch) | |
| tree | e854083edc691345b2499d37f65f3cf9c237d2c3 /lstring.c | |
| parent | 4eeb1831bee8c424a60b5ca05667b5d1c1bb662e (diff) | |
| download | lua-6ca7b63bce0ce4f1abf418dead256d3e51e41644.tar.gz lua-6ca7b63bce0ce4f1abf418dead256d3e51e41644.tar.bz2 lua-6ca7b63bce0ce4f1abf418dead256d3e51e41644.zip | |
check for shrinking string table done only at the end of a GC cycle
Diffstat (limited to 'lstring.c')
| -rw-r--r-- | lstring.c | 4 |
1 files changed, 1 insertions, 3 deletions
| @@ -1,5 +1,5 @@ | |||
| 1 | /* | 1 | /* |
| 2 | ** $Id: lstring.c,v 2.34 2013/09/05 19:31:49 roberto Exp roberto $ | 2 | ** $Id: lstring.c,v 2.35 2013/09/11 12:26:14 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 | */ |
| @@ -118,8 +118,6 @@ LUAI_FUNC void luaS_remove (lua_State *L, TString *ts) { | |||
| 118 | p = &(*p)->tsv.hnext; | 118 | p = &(*p)->tsv.hnext; |
| 119 | *p = (*p)->tsv.hnext; /* remove element from its list */ | 119 | *p = (*p)->tsv.hnext; /* remove element from its list */ |
| 120 | tb->nuse--; | 120 | tb->nuse--; |
| 121 | if (tb->nuse < tb->size/4) | ||
| 122 | luaS_resize(L, tb->size/2); | ||
| 123 | } | 121 | } |
| 124 | 122 | ||
| 125 | 123 | ||
