aboutsummaryrefslogtreecommitdiff
path: root/ltable.c
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>2005-07-11 11:01:37 -0300
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>2005-07-11 11:01:37 -0300
commit0f30d00c872b4dc4b77daabc55d72338dcc31847 (patch)
tree7418e9ff6b29d14bbe9cff579fc9e1f99a462ce5 /ltable.c
parente86dab2daec444580485dcdba5f3f68d1474dad5 (diff)
downloadlua-0f30d00c872b4dc4b77daabc55d72338dcc31847.tar.gz
lua-0f30d00c872b4dc4b77daabc55d72338dcc31847.tar.bz2
lua-0f30d00c872b4dc4b77daabc55d72338dcc31847.zip
warnings from Visual C
Diffstat (limited to 'ltable.c')
-rw-r--r--ltable.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/ltable.c b/ltable.c
index 07575f7d..73b59328 100644
--- a/ltable.c
+++ b/ltable.c
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: ltable.c,v 2.24 2005/05/20 15:53:42 roberto Exp roberto $ 2** $Id: ltable.c,v 2.25 2005/05/31 14:25:18 roberto Exp roberto $
3** Lua tables (hash) 3** Lua tables (hash)
4** See Copyright Notice in lua.h 4** See Copyright Notice in lua.h
5*/ 5*/
@@ -376,7 +376,7 @@ void luaH_free (lua_State *L, Table *t) {
376} 376}
377 377
378 378
379static Node *getfreepos (lua_State *L, Table *t) { 379static Node *getfreepos (Table *t) {
380 while (t->lastfree-- > t->node) { 380 while (t->lastfree-- > t->node) {
381 if (ttisnil(gkey(t->lastfree))) 381 if (ttisnil(gkey(t->lastfree)))
382 return t->lastfree; 382 return t->lastfree;
@@ -397,7 +397,7 @@ static TValue *newkey (lua_State *L, Table *t, const TValue *key) {
397 Node *mp = luaH_mainposition(t, key); 397 Node *mp = luaH_mainposition(t, key);
398 if (!ttisnil(gval(mp)) || mp == &luaH_dummynode) { 398 if (!ttisnil(gval(mp)) || mp == &luaH_dummynode) {
399 Node *othern; 399 Node *othern;
400 Node *n = getfreepos(L, t); /* get a free place */ 400 Node *n = getfreepos(t); /* get a free place */
401 if (n == NULL) { /* cannot find a free place? */ 401 if (n == NULL) { /* cannot find a free place? */
402 rehash(L, t, key); /* grow table */ 402 rehash(L, t, key); /* grow table */
403 return luaH_set(L, t, key); /* re-insert key into grown table */ 403 return luaH_set(L, t, key); /* re-insert key into grown table */