diff options
| author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2025-07-29 11:50:20 -0300 |
|---|---|---|
| committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2025-07-29 11:50:20 -0300 |
| commit | c33bb08ffe04f24e09571b59eed3c9b59b622d91 (patch) | |
| tree | c8b27b06d950d0907eb04ecbc91462d2b78ccea2 /lgc.c | |
| parent | e3716ee161bb5416b5eb846eff6039d61954cfbd (diff) | |
| download | lua-c33bb08ffe04f24e09571b59eed3c9b59b622d91.tar.gz lua-c33bb08ffe04f24e09571b59eed3c9b59b622d91.tar.bz2 lua-c33bb08ffe04f24e09571b59eed3c9b59b622d91.zip | |
Added some casts for 32-bit machines
When both 'int' and 'l_obj' have 32 bits, an unsigned int needs a
cast to be assigned to 'l_obj'. (As long as 'l_obj' can count the
total memory used by the system, these casts should be safe.)
Diffstat (limited to 'lgc.c')
| -rw-r--r-- | lgc.c | 2 |
1 files changed, 1 insertions, 1 deletions
| @@ -624,7 +624,7 @@ static l_mem traversetable (global_State *g, Table *h) { | |||
| 624 | linkgclist(h, g->allweak); /* must clear collected entries */ | 624 | linkgclist(h, g->allweak); /* must clear collected entries */ |
| 625 | break; | 625 | break; |
| 626 | } | 626 | } |
| 627 | return 1 + 2*sizenode(h) + h->asize; | 627 | return cast(l_mem, 1 + 2*sizenode(h) + h->asize); |
| 628 | } | 628 | } |
| 629 | 629 | ||
| 630 | 630 | ||
