diff options
author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2014-09-04 15:15:29 -0300 |
---|---|---|
committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2014-09-04 15:15:29 -0300 |
commit | 3a15c7ce4338de8414239a898f6c121294b4dde7 (patch) | |
tree | 2d449c2966afaf5d092b6d07d8f04b2b0a9b13bb /ltests.c | |
parent | 0a6b58c3aac2741cf1c84c44d168c73e3e478c4d (diff) | |
download | lua-3a15c7ce4338de8414239a898f6c121294b4dde7.tar.gz lua-3a15c7ce4338de8414239a898f6c121294b4dde7.tar.bz2 lua-3a15c7ce4338de8414239a898f6c121294b4dde7.zip |
size for array part of a table ('sizearray') changed from 'int' to
'unsigned int', which allows twice as many elements in the array part
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.183 2014/08/01 17:33:08 roberto Exp roberto $ | 2 | ** $Id: ltests.c,v 2.184 2014/09/01 17:58:55 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 | */ |
@@ -218,7 +218,7 @@ static void checkvalref (global_State *g, GCObject *f, const TValue *t) { | |||
218 | 218 | ||
219 | 219 | ||
220 | static void checktable (global_State *g, Table *h) { | 220 | static void checktable (global_State *g, Table *h) { |
221 | int i; | 221 | unsigned int i; |
222 | Node *n, *limit = gnode(h, sizenode(h)); | 222 | Node *n, *limit = gnode(h, sizenode(h)); |
223 | GCObject *hgc = obj2gco(h); | 223 | GCObject *hgc = obj2gco(h); |
224 | checkobjref(g, hgc, h->metatable); | 224 | checkobjref(g, hgc, h->metatable); |
@@ -667,7 +667,7 @@ static int table_query (lua_State *L) { | |||
667 | lua_pushinteger(L, luaH_isdummy(t->node) ? 0 : sizenode(t)); | 667 | lua_pushinteger(L, luaH_isdummy(t->node) ? 0 : sizenode(t)); |
668 | lua_pushinteger(L, t->lastfree - t->node); | 668 | lua_pushinteger(L, t->lastfree - t->node); |
669 | } | 669 | } |
670 | else if (i < t->sizearray) { | 670 | else if ((unsigned int)i < t->sizearray) { |
671 | lua_pushinteger(L, i); | 671 | lua_pushinteger(L, i); |
672 | pushobject(L, &t->array[i]); | 672 | pushobject(L, &t->array[i]); |
673 | lua_pushnil(L); | 673 | lua_pushnil(L); |