lua

A copy of the Lua development repository
Log | Files | Refs | README

commit 762baf05487a6574e6b9e55783e1a439b6fc9af3
parent b8a04658b2787701996b6d787bf3cc256fd667d1
Author: Roberto Ierusalimschy <roberto@inf.puc-rio.br>
Date:   Fri,  6 Apr 2018 14:52:15 -0300

detail (trim constants are unsigned)

Diffstat:
Mlmathlib.c | 6+++---
1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/lmathlib.c b/lmathlib.c @@ -1,5 +1,5 @@ /* -** $Id: lmathlib.c,v 1.129 2018/04/04 16:12:53 roberto Exp roberto $ +** $Id: lmathlib.c,v 1.130 2018/04/06 15:41:29 roberto Exp roberto $ ** Standard mathematical library ** See Copyright Notice in lua.h */ @@ -277,7 +277,7 @@ typedef unsigned long long Rand64; */ /* avoid using extra bits when needed */ -#define trim64(x) ((x) & 0xffffffffffffffff) +#define trim64(x) ((x) & 0xffffffffffffffffU) /* rotate left 'x' by 'n' bits */ @@ -346,7 +346,7 @@ typedef struct Rand64 { */ /* avoid using extra bits when needed */ -#define trim32(x) ((x) & 0xffffffff) +#define trim32(x) ((x) & 0xffffffffU) /*