diff options
Diffstat (limited to 'lmem.h')
-rw-r--r-- | lmem.h | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -39,11 +39,11 @@ | |||
39 | ** Computes the minimum between 'n' and 'MAX_SIZET/sizeof(t)', so that | 39 | ** Computes the minimum between 'n' and 'MAX_SIZET/sizeof(t)', so that |
40 | ** the result is not larger than 'n' and cannot overflow a 'size_t' | 40 | ** the result is not larger than 'n' and cannot overflow a 'size_t' |
41 | ** when multiplied by the size of type 't'. (Assumes that 'n' is an | 41 | ** when multiplied by the size of type 't'. (Assumes that 'n' is an |
42 | ** 'int' or 'unsigned int' and that 'int' is not larger than 'size_t'.) | 42 | ** 'int' and that 'int' is not larger than 'size_t'.) |
43 | */ | 43 | */ |
44 | #define luaM_limitN(n,t) \ | 44 | #define luaM_limitN(n,t) \ |
45 | ((cast_sizet(n) <= MAX_SIZET/sizeof(t)) ? (n) : \ | 45 | ((cast_sizet(n) <= MAX_SIZET/sizeof(t)) ? (n) : \ |
46 | cast_uint((MAX_SIZET/sizeof(t)))) | 46 | cast_int((MAX_SIZET/sizeof(t)))) |
47 | 47 | ||
48 | 48 | ||
49 | /* | 49 | /* |