diff options
author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2011-07-04 17:29:02 -0300 |
---|---|---|
committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2011-07-04 17:29:02 -0300 |
commit | 9e89a55a4fd701a9991d55b73edb93639a48d624 (patch) | |
tree | 3330b2372cb7f6b821db6e64ce6e3caf2646d59a | |
parent | b707e81c3d5c521556374619349d6159504a7d4c (diff) | |
download | lua-9e89a55a4fd701a9991d55b73edb93639a48d624.tar.gz lua-9e89a55a4fd701a9991d55b73edb93639a48d624.tar.bz2 lua-9e89a55a4fd701a9991d55b73edb93639a48d624.zip |
NILCONSTANT also depends no endianess (with NaN trick)
-rw-r--r-- | lobject.h | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: lobject.h,v 2.59 2011/06/09 18:21:25 roberto Exp roberto $ | 2 | ** $Id: lobject.h,v 2.60 2011/06/13 14:13:06 roberto Exp roberto $ |
3 | ** Type definitions for Lua objects | 3 | ** Type definitions for Lua objects |
4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
5 | */ | 5 | */ |
@@ -275,14 +275,17 @@ typedef struct lua_TValue TValue; | |||
275 | #endif | 275 | #endif |
276 | 276 | ||
277 | #undef TValuefields | 277 | #undef TValuefields |
278 | #undef NILCONSTANT | ||
278 | #if defined(LUA_NANTRICKLE) | 279 | #if defined(LUA_NANTRICKLE) |
279 | /* little endian */ | 280 | /* little endian */ |
280 | #define TValuefields \ | 281 | #define TValuefields \ |
281 | union { struct { Value v_; int tt_; } i; double d_; } u | 282 | union { struct { Value v_; int tt_; } i; double d_; } u |
283 | #define NILCONSTANT {{{NULL}, tag2tt(LUA_TNIL)}} | ||
282 | #else | 284 | #else |
283 | /* big endian */ | 285 | /* big endian */ |
284 | #define TValuefields \ | 286 | #define TValuefields \ |
285 | union { struct { int tt_; Value v_; } i; double d_; } u | 287 | union { struct { int tt_; Value v_; } i; double d_; } u |
288 | #define NILCONSTANT {{tag2tt(LUA_TNIL), {NULL}}} | ||
286 | #endif | 289 | #endif |
287 | 290 | ||
288 | #undef numfield | 291 | #undef numfield |
@@ -294,9 +297,6 @@ typedef struct lua_TValue TValue; | |||
294 | 297 | ||
295 | #define tag2tt(t) (NNMARK | (t)) | 298 | #define tag2tt(t) (NNMARK | (t)) |
296 | 299 | ||
297 | #undef NILCONSTANT | ||
298 | #define NILCONSTANT {{{NULL}, tag2tt(LUA_TNIL)}} | ||
299 | |||
300 | #undef val_ | 300 | #undef val_ |
301 | #define val_(o) ((o)->u.i.v_) | 301 | #define val_(o) ((o)->u.i.v_) |
302 | #undef num_ | 302 | #undef num_ |