diff options
Diffstat (limited to 'ltests.c')
-rw-r--r-- | ltests.c | 8 |
1 files changed, 3 insertions, 5 deletions
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: ltests.c,v 1.85 2001/06/28 15:06:20 roberto Exp roberto $ | 2 | ** $Id: ltests.c,v 1.86 2001/06/28 19:58: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 | */ |
@@ -251,13 +251,11 @@ static int hash_query (lua_State *L) { | |||
251 | lua_pushnumber(L, tsvalue(luaA_index(L, 1))->tsv.hash); | 251 | lua_pushnumber(L, tsvalue(luaA_index(L, 1))->tsv.hash); |
252 | } | 252 | } |
253 | else { | 253 | else { |
254 | Hash *t; | ||
255 | Node n; | ||
256 | TObject *o = luaA_index(L, 1); | 254 | TObject *o = luaA_index(L, 1); |
255 | Hash *t; | ||
257 | luaL_checktype(L, 2, LUA_TTABLE); | 256 | luaL_checktype(L, 2, LUA_TTABLE); |
258 | t = hvalue(luaA_index(L, 2)); | 257 | t = hvalue(luaA_index(L, 2)); |
259 | setobj(key(&n), o); | 258 | lua_pushnumber(L, luaH_mainposition(t, o) - t->node); |
260 | lua_pushnumber(L, luaH_mainposition(t, &n) - t->node); | ||
261 | } | 259 | } |
262 | return 1; | 260 | return 1; |
263 | } | 261 | } |