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 /lobject.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 'lobject.c')
| -rw-r--r-- | lobject.c | 2 |
1 files changed, 1 insertions, 1 deletions
| @@ -87,7 +87,7 @@ lu_byte luaO_codeparam (unsigned int p) { | |||
| 87 | ** overflow, so we check which order is best. | 87 | ** overflow, so we check which order is best. |
| 88 | */ | 88 | */ |
| 89 | l_mem luaO_applyparam (lu_byte p, l_mem x) { | 89 | l_mem luaO_applyparam (lu_byte p, l_mem x) { |
| 90 | unsigned int m = p & 0xF; /* mantissa */ | 90 | int m = p & 0xF; /* mantissa */ |
| 91 | int e = (p >> 4); /* exponent */ | 91 | int e = (p >> 4); /* exponent */ |
| 92 | if (e > 0) { /* normalized? */ | 92 | if (e > 0) { /* normalized? */ |
| 93 | e--; /* correct exponent */ | 93 | e--; /* correct exponent */ |
