aboutsummaryrefslogtreecommitdiff
path: root/ltable.h
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>2018-06-01 13:51:34 -0300
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>2018-06-01 13:51:34 -0300
commitfb8fa661366e15e98c60d8929feaab9e551a02f9 (patch)
treeb3eb16fcfe3eab8f4b07ccaa71c55011016ad005 /ltable.h
parentb3970649550fe8471c55bfae57aa3752ddfa97a9 (diff)
downloadlua-fb8fa661366e15e98c60d8929feaab9e551a02f9.tar.gz
lua-fb8fa661366e15e98c60d8929feaab9e551a02f9.tar.bz2
lua-fb8fa661366e15e98c60d8929feaab9e551a02f9.zip
no more 'luaH_emptyobject' and comparisons of addresses of global variables
(instead, use a different kind of nil to signal the fake entry returned when a key is not found in a table)
Diffstat (limited to 'ltable.h')
-rw-r--r--ltable.h7
1 files changed, 1 insertions, 6 deletions
diff --git a/ltable.h b/ltable.h
index bcf92984..9b1a3464 100644
--- a/ltable.h
+++ b/ltable.h
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: ltable.h,v 2.25 2017/06/09 16:48:44 roberto Exp roberto $ 2** $Id: ltable.h,v 2.26 2018/02/23 13:13:31 roberto Exp roberto $
3** Lua tables (hash) 3** Lua tables (hash)
4** See Copyright Notice in lua.h 4** See Copyright Notice in lua.h
5*/ 5*/
@@ -21,8 +21,6 @@
21/* true when 't' is using 'dummynode' as its hash part */ 21/* true when 't' is using 'dummynode' as its hash part */
22#define isdummy(t) ((t)->lastfree == NULL) 22#define isdummy(t) ((t)->lastfree == NULL)
23 23
24#define luaH_emptyobject (&luaH_emptyobject_)
25
26 24
27/* allocated size for hash nodes */ 25/* allocated size for hash nodes */
28#define allocsizenode(t) (isdummy(t) ? 0 : sizenode(t)) 26#define allocsizenode(t) (isdummy(t) ? 0 : sizenode(t))
@@ -32,9 +30,6 @@
32#define nodefromval(v) cast(Node *, (v)) 30#define nodefromval(v) cast(Node *, (v))
33 31
34 32
35LUAI_DDEC const TValue luaH_emptyobject_;
36
37
38LUAI_FUNC const TValue *luaH_getint (Table *t, lua_Integer key); 33LUAI_FUNC const TValue *luaH_getint (Table *t, lua_Integer key);
39LUAI_FUNC void luaH_setint (lua_State *L, Table *t, lua_Integer key, 34LUAI_FUNC void luaH_setint (lua_State *L, Table *t, lua_Integer key,
40 TValue *value); 35 TValue *value);