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 /llimits.h | |
| 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 'llimits.h')
| -rw-r--r-- | llimits.h | 4 |
1 files changed, 2 insertions, 2 deletions
| @@ -20,8 +20,8 @@ | |||
| 20 | /* | 20 | /* |
| 21 | ** 'l_mem' is a signed integer big enough to count the total memory | 21 | ** 'l_mem' is a signed integer big enough to count the total memory |
| 22 | ** used by Lua. (It is signed due to the use of debt in several | 22 | ** used by Lua. (It is signed due to the use of debt in several |
| 23 | ** computations.) Usually, 'ptrdiff_t' should work, but we use 'long' | 23 | ** computations.) 'lu_mem' is a corresponding unsigned type. Usually, |
| 24 | ** for 16-bit machines. | 24 | ** 'ptrdiff_t' should work, but we use 'long' for 16-bit machines. |
| 25 | */ | 25 | */ |
| 26 | #if defined(LUAI_MEM) /* { external definitions? */ | 26 | #if defined(LUAI_MEM) /* { external definitions? */ |
| 27 | typedef LUAI_MEM l_mem; | 27 | typedef LUAI_MEM l_mem; |
