mirror of
https://github.com/lua/lua
synced 2026-09-26 16:17:11 +03:00
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.)
This commit is contained in:
parent
e3716ee161
commit
c33bb08ffe
3 changed files with 4 additions and 4 deletions
2
lgc.c
2
lgc.c
|
|
@ -624,7 +624,7 @@ static l_mem traversetable (global_State *g, Table *h) {
|
|||
linkgclist(h, g->allweak); /* must clear collected entries */
|
||||
break;
|
||||
}
|
||||
return 1 + 2*sizenode(h) + h->asize;
|
||||
return cast(l_mem, 1 + 2*sizenode(h) + h->asize);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue