diff options
author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2013-05-02 09:31:26 -0300 |
---|---|---|
committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2013-05-02 09:31:26 -0300 |
commit | 6920a7f2e3f8cbdb9c9d43fca720b9dd459be733 (patch) | |
tree | 7f70464eed22721ff1b939023dd0053658685c43 /lvm.h | |
parent | 88bf2f83c035e612db103d7138a8312c455e4c88 (diff) | |
download | lua-6920a7f2e3f8cbdb9c9d43fca720b9dd459be733.tar.gz lua-6920a7f2e3f8cbdb9c9d43fca720b9dd459be733.tar.bz2 lua-6920a7f2e3f8cbdb9c9d43fca720b9dd459be733.zip |
new macro 'intop' (to perform integer arithmetic on unsigned types)
Diffstat (limited to 'lvm.h')
-rw-r--r-- | lvm.h | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: lvm.h,v 2.21 2013/04/26 16:03:50 roberto Exp roberto $ | 2 | ** $Id: lvm.h,v 2.22 2013/04/29 17:12:50 roberto Exp roberto $ |
3 | ** Lua virtual machine | 3 | ** Lua virtual machine |
4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
5 | */ | 5 | */ |
@@ -21,6 +21,8 @@ | |||
21 | #define tointeger(o,i) \ | 21 | #define tointeger(o,i) \ |
22 | (ttisinteger(o) ? (*(i) = ivalue(o), 1) : luaV_tointeger_(o,i)) | 22 | (ttisinteger(o) ? (*(i) = ivalue(o), 1) : luaV_tointeger_(o,i)) |
23 | 23 | ||
24 | #define intop(op,v1,v2) \ | ||
25 | cast_integer(cast_unsigned(v1) op cast_unsigned(v2)) | ||
24 | 26 | ||
25 | #define luaV_rawequalobj(t1,t2) luaV_equalobj(NULL,t1,t2) | 27 | #define luaV_rawequalobj(t1,t2) luaV_equalobj(NULL,t1,t2) |
26 | 28 | ||