mirror of
https://github.com/lua/lua
synced 2026-09-27 00:28:25 +03:00
new macro 'intop' (to perform integer arithmetic on unsigned types)
This commit is contained in:
parent
88bf2f83c0
commit
6920a7f2e3
2 changed files with 11 additions and 10 deletions
4
lvm.h
4
lvm.h
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
** $Id: lvm.h,v 2.21 2013/04/26 16:03:50 roberto Exp roberto $
|
||||
** $Id: lvm.h,v 2.22 2013/04/29 17:12:50 roberto Exp roberto $
|
||||
** Lua virtual machine
|
||||
** See Copyright Notice in lua.h
|
||||
*/
|
||||
|
|
@ -21,6 +21,8 @@
|
|||
#define tointeger(o,i) \
|
||||
(ttisinteger(o) ? (*(i) = ivalue(o), 1) : luaV_tointeger_(o,i))
|
||||
|
||||
#define intop(op,v1,v2) \
|
||||
cast_integer(cast_unsigned(v1) op cast_unsigned(v2))
|
||||
|
||||
#define luaV_rawequalobj(t1,t2) luaV_equalobj(NULL,t1,t2)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue