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 /lgc.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 'lgc.c')
-rw-r--r-- | lgc.c | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: lgc.c,v 2.192 2014/07/29 16:22:24 roberto Exp roberto $ | 2 | ** $Id: lgc.c,v 2.194 2014/09/03 16:54:41 roberto Exp roberto $ |
3 | ** Garbage Collector | 3 | ** Garbage Collector |
4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
5 | */ | 5 | */ |
@@ -379,7 +379,7 @@ static int traverseephemeron (global_State *g, Table *h) { | |||
379 | int hasclears = 0; /* true if table has white keys */ | 379 | int hasclears = 0; /* true if table has white keys */ |
380 | int hasww = 0; /* true if table has entry "white-key -> white-value" */ | 380 | int hasww = 0; /* true if table has entry "white-key -> white-value" */ |
381 | Node *n, *limit = gnodelast(h); | 381 | Node *n, *limit = gnodelast(h); |
382 | int i; | 382 | unsigned int i; |
383 | /* traverse array part */ | 383 | /* traverse array part */ |
384 | for (i = 0; i < h->sizearray; i++) { | 384 | for (i = 0; i < h->sizearray; i++) { |
385 | if (valiswhite(&h->array[i])) { | 385 | if (valiswhite(&h->array[i])) { |
@@ -415,7 +415,7 @@ static int traverseephemeron (global_State *g, Table *h) { | |||
415 | 415 | ||
416 | static void traversestrongtable (global_State *g, Table *h) { | 416 | static void traversestrongtable (global_State *g, Table *h) { |
417 | Node *n, *limit = gnodelast(h); | 417 | Node *n, *limit = gnodelast(h); |
418 | int i; | 418 | unsigned int i; |
419 | for (i = 0; i < h->sizearray; i++) /* traverse array part */ | 419 | for (i = 0; i < h->sizearray; i++) /* traverse array part */ |
420 | markvalue(g, &h->array[i]); | 420 | markvalue(g, &h->array[i]); |
421 | for (n = gnode(h, 0); n < limit; n++) { /* traverse hash part */ | 421 | for (n = gnode(h, 0); n < limit; n++) { /* traverse hash part */ |
@@ -635,7 +635,7 @@ static void clearvalues (global_State *g, GCObject *l, GCObject *f) { | |||
635 | for (; l != f; l = gco2t(l)->gclist) { | 635 | for (; l != f; l = gco2t(l)->gclist) { |
636 | Table *h = gco2t(l); | 636 | Table *h = gco2t(l); |
637 | Node *n, *limit = gnodelast(h); | 637 | Node *n, *limit = gnodelast(h); |
638 | int i; | 638 | unsigned int i; |
639 | for (i = 0; i < h->sizearray; i++) { | 639 | for (i = 0; i < h->sizearray; i++) { |
640 | TValue *o = &h->array[i]; | 640 | TValue *o = &h->array[i]; |
641 | if (iscleared(g, o)) /* value was collected? */ | 641 | if (iscleared(g, o)) /* value was collected? */ |