summaryrefslogtreecommitdiff
path: root/apps/plugins/lua/ltable.h
diff options
context:
space:
mode:
Diffstat (limited to 'apps/plugins/lua/ltable.h')
-rw-r--r--apps/plugins/lua/ltable.h19
1 files changed, 12 insertions, 7 deletions
diff --git a/apps/plugins/lua/ltable.h b/apps/plugins/lua/ltable.h
index aa28914871..d69449b2b8 100644
--- a/apps/plugins/lua/ltable.h
+++ b/apps/plugins/lua/ltable.h
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id$ 2** $Id: ltable.h,v 2.16.1.2 2013/08/30 15:49:41 roberto Exp $
3** Lua tables (hash) 3** Lua tables (hash)
4** See Copyright Notice in lua.h 4** See Copyright Notice in lua.h
5*/ 5*/
@@ -11,20 +11,25 @@
11 11
12 12
13#define gnode(t,i) (&(t)->node[i]) 13#define gnode(t,i) (&(t)->node[i])
14#define gkey(n) (&(n)->i_key.nk) 14#define gkey(n) (&(n)->i_key.tvk)
15#define gval(n) (&(n)->i_val) 15#define gval(n) (&(n)->i_val)
16#define gnext(n) ((n)->i_key.nk.next) 16#define gnext(n) ((n)->i_key.nk.next)
17 17
18#define key2tval(n) (&(n)->i_key.tvk) 18#define invalidateTMcache(t) ((t)->flags = 0)
19 19
20/* returns the key, given the value of a table entry */
21#define keyfromval(v) \
22 (gkey(cast(Node *, cast(char *, (v)) - offsetof(Node, i_val))))
20 23
21LUAI_FUNC const TValue *luaH_getnum (Table *t, int key); 24
22LUAI_FUNC TValue *luaH_setnum (lua_State *L, Table *t, int key); 25LUAI_FUNC const TValue *luaH_getint (Table *t, int key);
26LUAI_FUNC void luaH_setint (lua_State *L, Table *t, int key, TValue *value);
23LUAI_FUNC const TValue *luaH_getstr (Table *t, TString *key); 27LUAI_FUNC const TValue *luaH_getstr (Table *t, TString *key);
24LUAI_FUNC TValue *luaH_setstr (lua_State *L, Table *t, TString *key);
25LUAI_FUNC const TValue *luaH_get (Table *t, const TValue *key); 28LUAI_FUNC const TValue *luaH_get (Table *t, const TValue *key);
29LUAI_FUNC TValue *luaH_newkey (lua_State *L, Table *t, const TValue *key);
26LUAI_FUNC TValue *luaH_set (lua_State *L, Table *t, const TValue *key); 30LUAI_FUNC TValue *luaH_set (lua_State *L, Table *t, const TValue *key);
27LUAI_FUNC Table *luaH_new (lua_State *L, int narray, int lnhash); 31LUAI_FUNC Table *luaH_new (lua_State *L);
32LUAI_FUNC void luaH_resize (lua_State *L, Table *t, int nasize, int nhsize);
28LUAI_FUNC void luaH_resizearray (lua_State *L, Table *t, int nasize); 33LUAI_FUNC void luaH_resizearray (lua_State *L, Table *t, int nasize);
29LUAI_FUNC void luaH_free (lua_State *L, Table *t); 34LUAI_FUNC void luaH_free (lua_State *L, Table *t);
30LUAI_FUNC int luaH_next (lua_State *L, Table *t, StkId key); 35LUAI_FUNC int luaH_next (lua_State *L, Table *t, StkId key);