diff options
| author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2018-06-01 14:40:38 -0300 |
|---|---|---|
| committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2018-06-01 14:40:38 -0300 |
| commit | 505fc9122255b8a2ef761720bca21fd5e9be8e73 (patch) | |
| tree | cf3fe8068546547e7f53e86e16a32ee923a4c514 /lobject.h | |
| parent | fb8fa661366e15e98c60d8929feaab9e551a02f9 (diff) | |
| download | lua-505fc9122255b8a2ef761720bca21fd5e9be8e73.tar.gz lua-505fc9122255b8a2ef761720bca21fd5e9be8e73.tar.bz2 lua-505fc9122255b8a2ef761720bca21fd5e9be8e73.zip | |
no more 'luaO_nilobject' to avoid comparison of global variable addresses
(now uses static variables)
Diffstat (limited to 'lobject.h')
| -rw-r--r-- | lobject.h | 8 |
1 files changed, 1 insertions, 7 deletions
| @@ -1,5 +1,5 @@ | |||
| 1 | /* | 1 | /* |
| 2 | ** $Id: lobject.h,v 2.142 2018/04/04 14:23:41 roberto Exp roberto $ | 2 | ** $Id: lobject.h,v 2.143 2018/06/01 16:51:34 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 | */ |
| @@ -150,10 +150,6 @@ typedef StackValue *StkId; /* index to stack elements */ | |||
| 150 | #define setnilvalue(obj) settt_(obj, LUA_TNIL) | 150 | #define setnilvalue(obj) settt_(obj, LUA_TNIL) |
| 151 | 151 | ||
| 152 | 152 | ||
| 153 | /* (address of) a fixed nil value */ | ||
| 154 | #define luaO_nilobject (&luaO_nilobject_) | ||
| 155 | |||
| 156 | |||
| 157 | /* | 153 | /* |
| 158 | ** Variant tag, used only in tables to signal an empty slot | 154 | ** Variant tag, used only in tables to signal an empty slot |
| 159 | ** (which might be different from a slot containing nil) | 155 | ** (which might be different from a slot containing nil) |
| @@ -730,8 +726,6 @@ typedef struct Table { | |||
| 730 | #define sizenode(t) (twoto((t)->lsizenode)) | 726 | #define sizenode(t) (twoto((t)->lsizenode)) |
| 731 | 727 | ||
| 732 | 728 | ||
| 733 | LUAI_DDEC const TValue luaO_nilobject_; | ||
| 734 | |||
| 735 | /* size of buffer for 'luaO_utf8esc' function */ | 729 | /* size of buffer for 'luaO_utf8esc' function */ |
| 736 | #define UTF8BUFFSZ 8 | 730 | #define UTF8BUFFSZ 8 |
| 737 | 731 | ||
