aboutsummaryrefslogtreecommitdiff
path: root/ltests.c
diff options
context:
space:
mode:
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 3edf805e..44ed7bcc 100644
--- a/ltests.c
+++ b/ltests.c
@@ -359,7 +359,7 @@ static void checkvalref (global_State *g, GCObject *f, const TValue *t) {
359 359
360static void checktable (global_State *g, Table *h) { 360static void checktable (global_State *g, Table *h) {
361 unsigned int i; 361 unsigned int i;
362 unsigned int asize = luaH_realasize(h); 362 unsigned int asize = h->asize;
363 Node *n, *limit = gnode(h, sizenode(h)); 363 Node *n, *limit = gnode(h, sizenode(h));
364 GCObject *hgc = obj2gco(h); 364 GCObject *hgc = obj2gco(h);
365 checkobjrefN(g, hgc, h->metatable); 365 checkobjrefN(g, hgc, h->metatable);
@@ -1034,11 +1034,11 @@ static int table_query (lua_State *L) {
1034 unsigned int asize; 1034 unsigned int asize;
1035 luaL_checktype(L, 1, LUA_TTABLE); 1035 luaL_checktype(L, 1, LUA_TTABLE);
1036 t = hvalue(obj_at(L, 1)); 1036 t = hvalue(obj_at(L, 1));
1037 asize = luaH_realasize(t); 1037 asize = t->asize;
1038 if (i == -1) { 1038 if (i == -1) {
1039 lua_pushinteger(L, cast(lua_Integer, asize)); 1039 lua_pushinteger(L, cast(lua_Integer, asize));
1040 lua_pushinteger(L, cast(lua_Integer, allocsizenode(t))); 1040 lua_pushinteger(L, cast(lua_Integer, allocsizenode(t)));
1041 lua_pushinteger(L, cast(lua_Integer, t->alimit)); 1041 lua_pushinteger(L, cast(lua_Integer, asize > 0 ? *lenhint(t) : 0));
1042 return 3; 1042 return 3;
1043 } 1043 }
1044 else if (cast_uint(i) < asize) { 1044 else if (cast_uint(i) < asize) {