summaryrefslogtreecommitdiff
path: root/ltests.c
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>2016-11-07 10:38:35 -0200
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>2016-11-07 10:38:35 -0200
commit7b1fba69b7a887e37e57744309299d134e76e06e (patch)
treee5743e7f4792f065bb9644e827e43eb9a9c03a22 /ltests.c
parent697593d8d5b2e2287919423006c53dcac31d2b70 (diff)
downloadlua-7b1fba69b7a887e37e57744309299d134e76e06e.tar.gz
lua-7b1fba69b7a887e37e57744309299d134e76e06e.tar.bz2
lua-7b1fba69b7a887e37e57744309299d134e76e06e.zip
using 'lastfree == NULL' to signal that table is using the dummy
node for its hash part + new macro 'allocsizenode'
Diffstat (limited to 'ltests.c')
-rw-r--r--ltests.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/ltests.c b/ltests.c
index 98fdf223..e796fac3 100644
--- a/ltests.c
+++ b/ltests.c
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: ltests.c,v 2.208 2015/09/08 16:55:43 roberto Exp roberto $ 2** $Id: ltests.c,v 2.209 2015/10/12 16:38:19 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*/
@@ -687,8 +687,8 @@ static int table_query (lua_State *L) {
687 t = hvalue(obj_at(L, 1)); 687 t = hvalue(obj_at(L, 1));
688 if (i == -1) { 688 if (i == -1) {
689 lua_pushinteger(L, t->sizearray); 689 lua_pushinteger(L, t->sizearray);
690 lua_pushinteger(L, luaH_isdummy(t->node) ? 0 : sizenode(t)); 690 lua_pushinteger(L, allocsizenode(t));
691 lua_pushinteger(L, t->lastfree - t->node); 691 lua_pushinteger(L, isdummy(t) ? 0 : t->lastfree - t->node);
692 } 692 }
693 else if ((unsigned int)i < t->sizearray) { 693 else if ((unsigned int)i < t->sizearray) {
694 lua_pushinteger(L, i); 694 lua_pushinteger(L, i);