mirror of
https://github.com/lua/lua.git
synced 2025-01-28 06:03:00 +08:00
macro 'nvalue' removed (direct conversion from integer to double,
without an intermediate variable, can cause "excessive precision"
This commit is contained in:
parent
b22a4280c6
commit
fa6ea831b3
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
** $Id: lobject.h,v 2.75 2013/04/29 16:57:28 roberto Exp roberto $
|
** $Id: lobject.h,v 2.76 2013/05/02 12:37:24 roberto Exp roberto $
|
||||||
** Type definitions for Lua objects
|
** Type definitions for Lua objects
|
||||||
** See Copyright Notice in lua.h
|
** See Copyright Notice in lua.h
|
||||||
*/
|
*/
|
||||||
@ -153,9 +153,6 @@ typedef struct lua_TValue TValue;
|
|||||||
|
|
||||||
|
|
||||||
/* Macros to access values */
|
/* Macros to access values */
|
||||||
#define nvalue(o) \
|
|
||||||
check_exp(ttisnumber(o), (ttisfloat(o) ? val_(o).n : cast_num(val_(o).i)))
|
|
||||||
|
|
||||||
#define ivalue(o) check_exp(ttisinteger(o), val_(o).i)
|
#define ivalue(o) check_exp(ttisinteger(o), val_(o).i)
|
||||||
#define fltvalue(o) check_exp(ttisfloat(o), val_(o).n)
|
#define fltvalue(o) check_exp(ttisfloat(o), val_(o).n)
|
||||||
#define gcvalue(o) check_exp(iscollectable(o), val_(o).gc)
|
#define gcvalue(o) check_exp(iscollectable(o), val_(o).gc)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user