aboutsummaryrefslogtreecommitdiff
path: root/ltable.c
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>2000-06-30 11:35:17 -0300
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>2000-06-30 11:35:17 -0300
commitcfba57207660fd27ddac9ea51cdeb263c2d6b418 (patch)
tree3112ff095cd058017823a64dd592649ff750de89 /ltable.c
parentaa01d2568dcecf5a12ce2d8f04e969658ea46c89 (diff)
downloadlua-cfba57207660fd27ddac9ea51cdeb263c2d6b418.tar.gz
lua-cfba57207660fd27ddac9ea51cdeb263c2d6b418.tar.bz2
lua-cfba57207660fd27ddac9ea51cdeb263c2d6b418.zip
remove dummy argument in LUA_ASSERT
Diffstat (limited to 'ltable.c')
-rw-r--r--ltable.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/ltable.c b/ltable.c
index 4b4f37ac..0e271e8c 100644
--- a/ltable.c
+++ b/ltable.c
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: ltable.c,v 1.48 2000/06/12 13:52:05 roberto Exp roberto $ 2** $Id: ltable.c,v 1.49 2000/06/28 17:03:56 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*/
@@ -63,7 +63,7 @@ Node *luaH_mainposition (const Hash *t, const TObject *key) {
63 default: 63 default:
64 return NULL; /* invalid key */ 64 return NULL; /* invalid key */
65 } 65 }
66 LUA_ASSERT(L, h%(unsigned int)t->size == (h&((unsigned int)t->size-1)), 66 LUA_ASSERT(h%(unsigned int)t->size == (h&((unsigned int)t->size-1)),
67 "a&(x-1) == a%x, for x power of 2"); 67 "a&(x-1) == a%x, for x power of 2");
68 return &t->node[h&(t->size-1)]; 68 return &t->node[h&(t->size-1)];
69} 69}
@@ -140,7 +140,7 @@ void luaH_remove (Hash *t, TObject *key) {
140 } 140 }
141 ttype(key) = TAG_NUMBER; 141 ttype(key) = TAG_NUMBER;
142 nvalue(key) = n; 142 nvalue(key) = n;
143 LUA_ASSERT(L, luaH_mainposition(t, key) == mp, "cannot change hash"); 143 LUA_ASSERT(luaH_mainposition(t, key) == mp, "cannot change hash");
144 } 144 }
145} 145}
146 146
@@ -196,7 +196,7 @@ static void rehash (lua_State *L, Hash *t) {
196 Node *nold = t->node; 196 Node *nold = t->node;
197 int nelems = numuse(t); 197 int nelems = numuse(t);
198 int i; 198 int i;
199 LUA_ASSERT(L, nelems<=oldsize, "wrong count"); 199 LUA_ASSERT(nelems<=oldsize, "wrong count");
200 if (nelems >= oldsize-oldsize/4) /* using more than 3/4? */ 200 if (nelems >= oldsize-oldsize/4) /* using more than 3/4? */
201 setnodevector(L, t, (lint32)oldsize*2); 201 setnodevector(L, t, (lint32)oldsize*2);
202 else if (nelems <= oldsize/4 && /* less than 1/4? */ 202 else if (nelems <= oldsize/4 && /* less than 1/4? */