diff options
author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2017-11-16 11:19:06 -0200 |
---|---|---|
committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2017-11-16 11:19:06 -0200 |
commit | e4e5aa85a24bba6c243aeeaedc66ec712856c6db (patch) | |
tree | f2a4333254eb0e8ed7691d9110ff568d3bd6ec61 /lbitlib.c | |
parent | 4c0e36a46e11be2f101203ed0db66ea750bf4333 (diff) | |
download | lua-e4e5aa85a24bba6c243aeeaedc66ec712856c6db.tar.gz lua-e4e5aa85a24bba6c243aeeaedc66ec712856c6db.tar.bz2 lua-e4e5aa85a24bba6c243aeeaedc66ec712856c6db.zip |
detail ('signal' -> 'sign' in comments)
Diffstat (limited to 'lbitlib.c')
-rw-r--r-- | lbitlib.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: lbitlib.c,v 1.29 2015/10/08 15:55:35 roberto Exp roberto $ | 2 | ** $Id: lbitlib.c,v 1.30 2015/11/11 19:08:09 roberto Exp roberto $ |
3 | ** Standard library for bitwise operations | 3 | ** Standard library for bitwise operations |
4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
5 | */ | 5 | */ |
@@ -131,7 +131,7 @@ static int b_arshift (lua_State *L) { | |||
131 | else { /* arithmetic shift for 'negative' number */ | 131 | else { /* arithmetic shift for 'negative' number */ |
132 | if (i >= LUA_NBITS) r = ALLONES; | 132 | if (i >= LUA_NBITS) r = ALLONES; |
133 | else | 133 | else |
134 | r = trim((r >> i) | ~(trim(~(lua_Unsigned)0) >> i)); /* add signal bit */ | 134 | r = trim((r >> i) | ~(trim(~(lua_Unsigned)0) >> i)); /* add sign bit */ |
135 | pushunsigned(L, r); | 135 | pushunsigned(L, r); |
136 | return 1; | 136 | return 1; |
137 | } | 137 | } |