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, 7 insertions, 12 deletions
diff --git a/apps/plugins/lua/ltable.h b/apps/plugins/lua/ltable.h
index d69449b2b8..aa28914871 100644
--- a/apps/plugins/lua/ltable.h
+++ b/apps/plugins/lua/ltable.h
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: ltable.h,v 2.16.1.2 2013/08/30 15:49:41 roberto Exp $ 2** $Id$
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,25 +11,20 @@
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.tvk) 14#define gkey(n) (&(n)->i_key.nk)
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 invalidateTMcache(t) ((t)->flags = 0) 18#define key2tval(n) (&(n)->i_key.tvk)
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))))
23 20
24 21LUAI_FUNC const TValue *luaH_getnum (Table *t, int key);
25LUAI_FUNC const TValue *luaH_getint (Table *t, int key); 22LUAI_FUNC TValue *luaH_setnum (lua_State *L, Table *t, int key);
26LUAI_FUNC void luaH_setint (lua_State *L, Table *t, int key, TValue *value);
27LUAI_FUNC const TValue *luaH_getstr (Table *t, TString *key); 23LUAI_FUNC const TValue *luaH_getstr (Table *t, TString *key);
24LUAI_FUNC TValue *luaH_setstr (lua_State *L, Table *t, TString *key);
28LUAI_FUNC const TValue *luaH_get (Table *t, const TValue *key); 25LUAI_FUNC const TValue *luaH_get (Table *t, const TValue *key);
29LUAI_FUNC TValue *luaH_newkey (lua_State *L, Table *t, const TValue *key);
30LUAI_FUNC TValue *luaH_set (lua_State *L, Table *t, const TValue *key); 26LUAI_FUNC TValue *luaH_set (lua_State *L, Table *t, const TValue *key);
31LUAI_FUNC Table *luaH_new (lua_State *L); 27LUAI_FUNC Table *luaH_new (lua_State *L, int narray, int lnhash);
32LUAI_FUNC void luaH_resize (lua_State *L, Table *t, int nasize, int nhsize);
33LUAI_FUNC void luaH_resizearray (lua_State *L, Table *t, int nasize); 28LUAI_FUNC void luaH_resizearray (lua_State *L, Table *t, int nasize);
34LUAI_FUNC void luaH_free (lua_State *L, Table *t); 29LUAI_FUNC void luaH_free (lua_State *L, Table *t);
35LUAI_FUNC int luaH_next (lua_State *L, Table *t, StkId key); 30LUAI_FUNC int luaH_next (lua_State *L, Table *t, StkId key);