diff options
Diffstat (limited to 'ltests.c')
-rw-r--r-- | ltests.c | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: ltests.c,v 1.168 2003/11/05 11:59:14 roberto Exp roberto $ | 2 | ** $Id: ltests.c,v 1.169 2003/11/19 12:21: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 | */ |
@@ -269,10 +269,10 @@ static int mem_query (lua_State *L) { | |||
269 | static int hash_query (lua_State *L) { | 269 | static int hash_query (lua_State *L) { |
270 | if (lua_isnone(L, 2)) { | 270 | if (lua_isnone(L, 2)) { |
271 | luaL_argcheck(L, lua_type(L, 1) == LUA_TSTRING, 1, "string expected"); | 271 | luaL_argcheck(L, lua_type(L, 1) == LUA_TSTRING, 1, "string expected"); |
272 | lua_pushinteger(L, tsvalue(func_at(L, 1))->tsv.hash); | 272 | lua_pushinteger(L, tsvalue(func_at(L, 1))->hash); |
273 | } | 273 | } |
274 | else { | 274 | else { |
275 | TObject *o = func_at(L, 1); | 275 | TValue *o = func_at(L, 1); |
276 | Table *t; | 276 | Table *t; |
277 | luaL_checktype(L, 2, LUA_TTABLE); | 277 | luaL_checktype(L, 2, LUA_TTABLE); |
278 | t = hvalue(func_at(L, 2)); | 278 | t = hvalue(func_at(L, 2)); |
@@ -338,7 +338,7 @@ static int string_query (lua_State *L) { | |||
338 | GCObject *ts; | 338 | GCObject *ts; |
339 | int n = 0; | 339 | int n = 0; |
340 | for (ts = tb->hash[s]; ts; ts = ts->gch.next) { | 340 | for (ts = tb->hash[s]; ts; ts = ts->gch.next) { |
341 | setsvalue2s(L->top, gcotots(ts)); | 341 | setsvalue2s(L, L->top, gco2ts(ts)); |
342 | incr_top(L); | 342 | incr_top(L); |
343 | n++; | 343 | n++; |
344 | } | 344 | } |