mirror of
https://github.com/lua/lua
synced 2025-01-09 19:12:38 +03:00
NILCONSTANT also depends no endianess (with NaN trick)
This commit is contained in:
parent
b707e81c3d
commit
9e89a55a4f
@ -1,5 +1,5 @@
|
||||
/*
|
||||
** $Id: lobject.h,v 2.59 2011/06/09 18:21:25 roberto Exp roberto $
|
||||
** $Id: lobject.h,v 2.60 2011/06/13 14:13:06 roberto Exp roberto $
|
||||
** Type definitions for Lua objects
|
||||
** See Copyright Notice in lua.h
|
||||
*/
|
||||
@ -275,14 +275,17 @@ typedef struct lua_TValue TValue;
|
||||
#endif
|
||||
|
||||
#undef TValuefields
|
||||
#undef NILCONSTANT
|
||||
#if defined(LUA_NANTRICKLE)
|
||||
/* little endian */
|
||||
#define TValuefields \
|
||||
union { struct { Value v_; int tt_; } i; double d_; } u
|
||||
#define NILCONSTANT {{{NULL}, tag2tt(LUA_TNIL)}}
|
||||
#else
|
||||
/* big endian */
|
||||
#define TValuefields \
|
||||
union { struct { int tt_; Value v_; } i; double d_; } u
|
||||
#define NILCONSTANT {{tag2tt(LUA_TNIL), {NULL}}}
|
||||
#endif
|
||||
|
||||
#undef numfield
|
||||
@ -294,9 +297,6 @@ typedef struct lua_TValue TValue;
|
||||
|
||||
#define tag2tt(t) (NNMARK | (t))
|
||||
|
||||
#undef NILCONSTANT
|
||||
#define NILCONSTANT {{{NULL}, tag2tt(LUA_TNIL)}}
|
||||
|
||||
#undef val_
|
||||
#define val_(o) ((o)->u.i.v_)
|
||||
#undef num_
|
||||
|
Loading…
Reference in New Issue
Block a user