field 'sizearray' in struct 'Table' changed to 'alimit', which can

be used as a hint for '#t'
This commit is contained in:
Roberto Ierusalimschy
2018-06-15 11:14:20 -03:00
parent 06127927ff
commit 6e600695f8
7 changed files with 201 additions and 54 deletions

4
lvm.h
View File

@@ -1,5 +1,5 @@
/*
** $Id: lvm.h,v 2.50 2018/02/21 12:54:26 roberto Exp roberto $
** $Id: lvm.h,v 2.51 2018/02/23 13:13:31 roberto Exp roberto $
** Lua virtual machine
** See Copyright Notice in lua.h
*/
@@ -84,7 +84,7 @@
#define luaV_fastgeti(L,t,k,slot) \
(!ttistable(t) \
? (slot = NULL, 0) /* not a table; 'slot' is NULL and result is 0 */ \
: (slot = (l_castS2U(k) - 1u < hvalue(t)->sizearray) \
: (slot = (l_castS2U(k) - 1u < hvalue(t)->alimit) \
? &hvalue(t)->array[k - 1] : luaH_getint(hvalue(t), k), \
!isempty(slot))) /* result not empty? */