summaryrefslogtreecommitdiff
path: root/ltable.c
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>1998-12-30 11:14:46 -0200
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>1998-12-30 11:14:46 -0200
commit9a455438417b45be12b763ca56005b32bf0bb017 (patch)
tree9439ba61ebd0606aebf97f8ba445d16dee5e4b20 /ltable.c
parent766e67ef3b2af42f800b281e0fa0f57c7e3d2e3f (diff)
downloadlua-github-9a455438417b45be12b763ca56005b32bf0bb017.tar.gz
tables are better manipulated via "Hash *" instead of "TObject" or
"lua_Object".
Diffstat (limited to 'ltable.c')
-rw-r--r--ltable.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/ltable.c b/ltable.c
index d2ced6fc..35a7eec8 100644
--- a/ltable.c
+++ b/ltable.c
@@ -1,5 +1,5 @@
/*
-** $Id: ltable.c,v 1.14 1998/08/10 21:36:32 roberto Exp roberto $
+** $Id: ltable.c,v 1.15 1998/08/11 16:38:34 roberto Exp roberto $
** Lua tables (hash)
** See Copyright Notice in lua.h
*/
@@ -181,8 +181,7 @@ TObject *luaH_set (Hash *t, TObject *ref)
}
-static Node *hashnext (Hash *t, int i)
-{
+static Node *hashnext (Hash *t, int i) {
Node *n;
int tsize = nhash(t);
if (i >= tsize)
@@ -196,9 +195,7 @@ static Node *hashnext (Hash *t, int i)
return node(t, i);
}
-Node *luaH_next (TObject *o, TObject *r)
-{
- Hash *t = avalue(o);
+Node *luaH_next (Hash *t, TObject *r) {
if (ttype(r) == LUA_T_NIL)
return hashnext(t, 0);
else {