aboutsummaryrefslogtreecommitdiff
path: root/lstring.c
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>2010-05-10 15:23:45 -0300
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>2010-05-10 15:23:45 -0300
commit1c1a98e872ad09b12fe2085031f0045f993ca5f0 (patch)
treea711825a8b3f991797ef19dfaad083acbf59189a /lstring.c
parentc006f085d98923e505c7fe8909944d3c182f8301 (diff)
downloadlua-1c1a98e872ad09b12fe2085031f0045f993ca5f0.tar.gz
lua-1c1a98e872ad09b12fe2085031f0045f993ca5f0.tar.bz2
lua-1c1a98e872ad09b12fe2085031f0045f993ca5f0.zip
corrected some places where an old object could end up in front
of a new one + minimal documentation about this problem
Diffstat (limited to 'lstring.c')
-rw-r--r--lstring.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/lstring.c b/lstring.c
index dcc40fdd..4144cb18 100644
--- a/lstring.c
+++ b/lstring.c
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: lstring.c,v 2.16 2009/12/16 16:42:58 roberto Exp roberto $ 2** $Id: lstring.c,v 2.17 2010/04/03 20:24:18 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*/
@@ -37,6 +37,7 @@ void luaS_resize (lua_State *L, int newsize) {
37 unsigned int h = lmod(gco2ts(p)->hash, newsize); /* new position */ 37 unsigned int h = lmod(gco2ts(p)->hash, newsize); /* new position */
38 gch(p)->next = tb->hash[h]; /* chain it */ 38 gch(p)->next = tb->hash[h]; /* chain it */
39 tb->hash[h] = p; 39 tb->hash[h] = p;
40 resetoldbit(p); /* see MOVE OLD rule */
40 p = next; 41 p = next;
41 } 42 }
42 } 43 }