diff options
author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2013-04-12 15:48:47 -0300 |
---|---|---|
committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2013-04-12 15:48:47 -0300 |
commit | 2ca518141350667e38941eac35b76980095d2fdc (patch) | |
tree | 82595f0dfd57df5782905621298c8aae68b46389 /ltable.h | |
parent | f5ae26ec6c2eb69f03f316e59c1e1977c52c7c23 (diff) | |
download | lua-2ca518141350667e38941eac35b76980095d2fdc.tar.gz lua-2ca518141350667e38941eac35b76980095d2fdc.tar.bz2 lua-2ca518141350667e38941eac35b76980095d2fdc.zip |
Branch 5.2 - new releases for 5.2 go from here, main trunk goes
for next version
Diffstat (limited to 'ltable.h')
-rw-r--r-- | ltable.h | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/ltable.h b/ltable.h new file mode 100644 index 00000000..2f6f5c2d --- /dev/null +++ b/ltable.h | |||
@@ -0,0 +1,41 @@ | |||
1 | /* | ||
2 | ** $Id: ltable.h,v 2.16 2011/08/17 20:26:47 roberto Exp $ | ||
3 | ** Lua tables (hash) | ||
4 | ** See Copyright Notice in lua.h | ||
5 | */ | ||
6 | |||
7 | #ifndef ltable_h | ||
8 | #define ltable_h | ||
9 | |||
10 | #include "lobject.h" | ||
11 | |||
12 | |||
13 | #define gnode(t,i) (&(t)->node[i]) | ||
14 | #define gkey(n) (&(n)->i_key.tvk) | ||
15 | #define gval(n) (&(n)->i_val) | ||
16 | #define gnext(n) ((n)->i_key.nk.next) | ||
17 | |||
18 | #define invalidateTMcache(t) ((t)->flags = 0) | ||
19 | |||
20 | |||
21 | LUAI_FUNC const TValue *luaH_getint (Table *t, int key); | ||
22 | LUAI_FUNC void luaH_setint (lua_State *L, Table *t, int key, TValue *value); | ||
23 | LUAI_FUNC const TValue *luaH_getstr (Table *t, TString *key); | ||
24 | LUAI_FUNC const TValue *luaH_get (Table *t, const TValue *key); | ||
25 | LUAI_FUNC TValue *luaH_newkey (lua_State *L, Table *t, const TValue *key); | ||
26 | LUAI_FUNC TValue *luaH_set (lua_State *L, Table *t, const TValue *key); | ||
27 | LUAI_FUNC Table *luaH_new (lua_State *L); | ||
28 | LUAI_FUNC void luaH_resize (lua_State *L, Table *t, int nasize, int nhsize); | ||
29 | LUAI_FUNC void luaH_resizearray (lua_State *L, Table *t, int nasize); | ||
30 | LUAI_FUNC void luaH_free (lua_State *L, Table *t); | ||
31 | LUAI_FUNC int luaH_next (lua_State *L, Table *t, StkId key); | ||
32 | LUAI_FUNC int luaH_getn (Table *t); | ||
33 | |||
34 | |||
35 | #if defined(LUA_DEBUG) | ||
36 | LUAI_FUNC Node *luaH_mainposition (const Table *t, const TValue *key); | ||
37 | LUAI_FUNC int luaH_isdummy (Node *n); | ||
38 | #endif | ||
39 | |||
40 | |||
41 | #endif | ||