comparison src/lua/ltable.h @ 11:27763b933818

raise lua sources up one level
author Robert McIntyre <rlm@mit.edu>
date Sat, 03 Mar 2012 11:07:39 -0600
parents src/lua/src/ltable.h@f9f4f1b99eed
children
comparison
equal deleted inserted replaced
10:48b74a4e4692 11:27763b933818
1 /*
2 ** $Id: ltable.h,v 2.10.1.1 2007/12/27 13:02:25 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.nk)
15 #define gval(n) (&(n)->i_val)
16 #define gnext(n) ((n)->i_key.nk.next)
17
18 #define key2tval(n) (&(n)->i_key.tvk)
19
20
21 LUAI_FUNC const TValue *luaH_getnum (Table *t, int key);
22 LUAI_FUNC TValue *luaH_setnum (lua_State *L, Table *t, int 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);
25 LUAI_FUNC const TValue *luaH_get (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, int narray, int lnhash);
28 LUAI_FUNC void luaH_resizearray (lua_State *L, Table *t, int nasize);
29 LUAI_FUNC void luaH_free (lua_State *L, Table *t);
30 LUAI_FUNC int luaH_next (lua_State *L, Table *t, StkId key);
31 LUAI_FUNC int luaH_getn (Table *t);
32
33
34 #if defined(LUA_DEBUG)
35 LUAI_FUNC Node *luaH_mainposition (const Table *t, const TValue *key);
36 LUAI_FUNC int luaH_isdummy (Node *n);
37 #endif
38
39
40 #endif