aboutsummaryrefslogtreecommitdiff
path: root/ltests.c
diff options
context:
space:
mode:
Diffstat (limited to 'ltests.c')
-rw-r--r--ltests.c13
1 files changed, 5 insertions, 8 deletions
diff --git a/ltests.c b/ltests.c
index b78de996..0093fd15 100644
--- a/ltests.c
+++ b/ltests.c
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: ltests.c,v 1.82 2001/06/06 18:00:19 roberto Exp roberto $ 2** $Id: ltests.c,v 1.83 2001/06/15 20:36:57 roberto Exp roberto $
3** Internal Module for Debugging of the Lua Implementation 3** Internal Module for Debugging of the Lua Implementation
4** See Copyright Notice in lua.h 4** See Copyright Notice in lua.h
5*/ 5*/
@@ -298,7 +298,7 @@ static int hash_query (lua_State *L) {
298 TObject *o = luaA_index(L, 1); 298 TObject *o = luaA_index(L, 1);
299 luaL_checktype(L, 2, LUA_TTABLE); 299 luaL_checktype(L, 2, LUA_TTABLE);
300 t = hvalue(luaA_index(L, 2)); 300 t = hvalue(luaA_index(L, 2));
301 setobj2key(&n, o); 301 setobj(key(&n), o);
302 lua_pushnumber(L, luaH_mainposition(t, &n) - t->node); 302 lua_pushnumber(L, luaH_mainposition(t, &n) - t->node);
303 } 303 }
304 return 1; 304 return 1;
@@ -317,12 +317,9 @@ static int table_query (lua_State *L) {
317 } 317 }
318 else if (i < t->size) { 318 else if (i < t->size) {
319 if (ttype(val(node(t, i))) != LUA_TNIL || 319 if (ttype(val(node(t, i))) != LUA_TNIL ||
320 ttype_key(node(t, i)) == LUA_TNIL || 320 ttype(key(node(t, i))) == LUA_TNIL ||
321 ttype_key(node(t, i)) == LUA_TNUMBER || 321 ttype(key(node(t, i))) == LUA_TNUMBER) {
322 tsvalue_key(node(t, i)) != NULL) { 322 luaA_pushobject(L, key(node(t, i)));
323 TObject o;
324 setkey2obj(&o, node(t, i));
325 luaA_pushobject(L, &o);
326 } 323 }
327 else 324 else
328 lua_pushstring(L, "<undef>"); 325 lua_pushstring(L, "<undef>");