diff options
Diffstat (limited to 'apps/plugins/lua/ltable.h')
-rw-r--r-- | apps/plugins/lua/ltable.h | 19 |
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 | 21 | LUAI_FUNC const TValue *luaH_getnum (Table *t, int key); | |
25 | LUAI_FUNC const TValue *luaH_getint (Table *t, int key); | 22 | LUAI_FUNC TValue *luaH_setnum (lua_State *L, Table *t, int key); |
26 | LUAI_FUNC void luaH_setint (lua_State *L, Table *t, int key, TValue *value); | ||
27 | LUAI_FUNC const TValue *luaH_getstr (Table *t, TString *key); | 23 | LUAI_FUNC const TValue *luaH_getstr (Table *t, TString *key); |
24 | LUAI_FUNC TValue *luaH_setstr (lua_State *L, Table *t, TString *key); | ||
28 | LUAI_FUNC const TValue *luaH_get (Table *t, const TValue *key); | 25 | LUAI_FUNC const TValue *luaH_get (Table *t, const TValue *key); |
29 | LUAI_FUNC TValue *luaH_newkey (lua_State *L, Table *t, const TValue *key); | ||
30 | LUAI_FUNC TValue *luaH_set (lua_State *L, Table *t, const TValue *key); | 26 | LUAI_FUNC TValue *luaH_set (lua_State *L, Table *t, const TValue *key); |
31 | LUAI_FUNC Table *luaH_new (lua_State *L); | 27 | LUAI_FUNC Table *luaH_new (lua_State *L, int narray, int lnhash); |
32 | LUAI_FUNC void luaH_resize (lua_State *L, Table *t, int nasize, int nhsize); | ||
33 | LUAI_FUNC void luaH_resizearray (lua_State *L, Table *t, int nasize); | 28 | LUAI_FUNC void luaH_resizearray (lua_State *L, Table *t, int nasize); |
34 | LUAI_FUNC void luaH_free (lua_State *L, Table *t); | 29 | LUAI_FUNC void luaH_free (lua_State *L, Table *t); |
35 | LUAI_FUNC int luaH_next (lua_State *L, Table *t, StkId key); | 30 | LUAI_FUNC int luaH_next (lua_State *L, Table *t, StkId key); |