diff options
Diffstat (limited to '')
| -rw-r--r-- | lgc.c | 2 | ||||
| -rw-r--r-- | llimits.h | 4 | ||||
| -rw-r--r-- | lobject.c | 2 |
3 files changed, 4 insertions, 4 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 | ||
| @@ -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; |
| @@ -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 */ |
