diff options
author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2016-11-07 10:38:35 -0200 |
---|---|---|
committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2016-11-07 10:38:35 -0200 |
commit | 7b1fba69b7a887e37e57744309299d134e76e06e (patch) | |
tree | e5743e7f4792f065bb9644e827e43eb9a9c03a22 /ltests.c | |
parent | 697593d8d5b2e2287919423006c53dcac31d2b70 (diff) | |
download | lua-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.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -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); |