aboutsummaryrefslogtreecommitdiff
path: root/ltests.c
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>2022-11-01 15:42:08 -0300
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>2022-11-01 15:42:08 -0300
commit8047b2d03eaaeee44871a11f8d3a3135f2639b1a (patch)
tree2b2d246e2c63ba0accd7c3463a0d331669abe1ef /ltests.c
parentee645472ebe153e2c6669c84a632297a8110bdb6 (diff)
downloadlua-8047b2d03eaaeee44871a11f8d3a3135f2639b1a.tar.gz
lua-8047b2d03eaaeee44871a11f8d3a3135f2639b1a.tar.bz2
lua-8047b2d03eaaeee44871a11f8d3a3135f2639b1a.zip
Tables have a 'lastfree' information only when needed
Only tables with some minimum number of entries in their hash part have a 'lastfree' field, kept in a header before the node vector.
Diffstat (limited to 'ltests.c')
-rw-r--r--ltests.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/ltests.c b/ltests.c
index 4a0a6af1..1caed04c 100644
--- a/ltests.c
+++ b/ltests.c
@@ -999,9 +999,8 @@ static int table_query (lua_State *L) {
999 if (i == -1) { 999 if (i == -1) {
1000 lua_pushinteger(L, asize); 1000 lua_pushinteger(L, asize);
1001 lua_pushinteger(L, allocsizenode(t)); 1001 lua_pushinteger(L, allocsizenode(t));
1002 lua_pushinteger(L, isdummy(t) ? 0 : t->lastfree - t->node);
1003 lua_pushinteger(L, t->alimit); 1002 lua_pushinteger(L, t->alimit);
1004 return 4; 1003 return 3;
1005 } 1004 }
1006 else if ((unsigned int)i < asize) { 1005 else if ((unsigned int)i < asize) {
1007 lua_pushinteger(L, i); 1006 lua_pushinteger(L, i);