aboutsummaryrefslogtreecommitdiff
path: root/ltable.h
diff options
context:
space:
mode:
Diffstat (limited to 'ltable.h')
-rw-r--r--ltable.h7
1 files changed, 6 insertions, 1 deletions
diff --git a/ltable.h b/ltable.h
index 20ddacd0..bad66516 100644
--- a/ltable.h
+++ b/ltable.h
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: ltable.h,v 2.19 2014/07/29 16:22:24 roberto Exp roberto $ 2** $Id: ltable.h,v 2.20 2014/09/04 18:15:29 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*/
@@ -18,6 +18,10 @@
18/* 'const' to avoid wrong writings that can mess up field 'next' */ 18/* 'const' to avoid wrong writings that can mess up field 'next' */
19#define gkey(n) cast(const TValue*, (&(n)->i_key.tvk)) 19#define gkey(n) cast(const TValue*, (&(n)->i_key.tvk))
20 20
21/*
22** writable version of 'gkey'; allows updates to individual fields,
23** but not to the whole (which has incompatible type)
24*/
21#define wgkey(n) (&(n)->i_key.nk) 25#define wgkey(n) (&(n)->i_key.nk)
22 26
23#define invalidateTMcache(t) ((t)->flags = 0) 27#define invalidateTMcache(t) ((t)->flags = 0)
@@ -31,6 +35,7 @@
31LUAI_FUNC const TValue *luaH_getint (Table *t, lua_Integer key); 35LUAI_FUNC const TValue *luaH_getint (Table *t, lua_Integer key);
32LUAI_FUNC void luaH_setint (lua_State *L, Table *t, lua_Integer key, 36LUAI_FUNC void luaH_setint (lua_State *L, Table *t, lua_Integer key,
33 TValue *value); 37 TValue *value);
38LUAI_FUNC const TValue *luaH_getshortstr (Table *t, TString *key);
34LUAI_FUNC const TValue *luaH_getstr (Table *t, TString *key); 39LUAI_FUNC const TValue *luaH_getstr (Table *t, TString *key);
35LUAI_FUNC const TValue *luaH_get (Table *t, const TValue *key); 40LUAI_FUNC const TValue *luaH_get (Table *t, const TValue *key);
36LUAI_FUNC TValue *luaH_newkey (lua_State *L, Table *t, const TValue *key); 41LUAI_FUNC TValue *luaH_newkey (lua_State *L, Table *t, const TValue *key);