diff options
| author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2018-04-06 14:52:42 -0300 |
|---|---|---|
| committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2018-04-06 14:52:42 -0300 |
| commit | 762baf05487a6574e6b9e55783e1a439b6fc9af3 (patch) | |
| tree | 6d7db499eec82f39ef067ab11e0a701d9a223a24 | |
| parent | b8a04658b2787701996b6d787bf3cc256fd667d1 (diff) | |
| download | lua-762baf05487a6574e6b9e55783e1a439b6fc9af3.tar.gz lua-762baf05487a6574e6b9e55783e1a439b6fc9af3.tar.bz2 lua-762baf05487a6574e6b9e55783e1a439b6fc9af3.zip | |
detail (trim constants are unsigned)
| -rw-r--r-- | lmathlib.c | 6 |
1 files changed, 3 insertions, 3 deletions
| @@ -1,5 +1,5 @@ | |||
| 1 | /* | 1 | /* |
| 2 | ** $Id: lmathlib.c,v 1.129 2018/04/04 16:12:53 roberto Exp roberto $ | 2 | ** $Id: lmathlib.c,v 1.130 2018/04/06 15:41:29 roberto Exp roberto $ |
| 3 | ** Standard mathematical library | 3 | ** Standard mathematical library |
| 4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
| 5 | */ | 5 | */ |
| @@ -277,7 +277,7 @@ typedef unsigned long long Rand64; | |||
| 277 | */ | 277 | */ |
| 278 | 278 | ||
| 279 | /* avoid using extra bits when needed */ | 279 | /* avoid using extra bits when needed */ |
| 280 | #define trim64(x) ((x) & 0xffffffffffffffff) | 280 | #define trim64(x) ((x) & 0xffffffffffffffffU) |
| 281 | 281 | ||
| 282 | 282 | ||
| 283 | /* rotate left 'x' by 'n' bits */ | 283 | /* rotate left 'x' by 'n' bits */ |
| @@ -346,7 +346,7 @@ typedef struct Rand64 { | |||
| 346 | */ | 346 | */ |
| 347 | 347 | ||
| 348 | /* avoid using extra bits when needed */ | 348 | /* avoid using extra bits when needed */ |
| 349 | #define trim32(x) ((x) & 0xffffffff) | 349 | #define trim32(x) ((x) & 0xffffffffU) |
| 350 | 350 | ||
| 351 | 351 | ||
| 352 | /* | 352 | /* |
