annotate src/lua/ltable.h @ 77:9ba461a5c60f

disk backup complete
author Robert McIntyre <rlm@mit.edu>
date Thu, 08 Mar 2012 21:16:53 -0600
parents 27763b933818
children
rev   line source
rlm@1 1 /*
rlm@1 2 ** $Id: ltable.h,v 2.10.1.1 2007/12/27 13:02:25 roberto Exp $
rlm@1 3 ** Lua tables (hash)
rlm@1 4 ** See Copyright Notice in lua.h
rlm@1 5 */
rlm@1 6
rlm@1 7 #ifndef ltable_h
rlm@1 8 #define ltable_h
rlm@1 9
rlm@1 10 #include "lobject.h"
rlm@1 11
rlm@1 12
rlm@1 13 #define gnode(t,i) (&(t)->node[i])
rlm@1 14 #define gkey(n) (&(n)->i_key.nk)
rlm@1 15 #define gval(n) (&(n)->i_val)
rlm@1 16 #define gnext(n) ((n)->i_key.nk.next)
rlm@1 17
rlm@1 18 #define key2tval(n) (&(n)->i_key.tvk)
rlm@1 19
rlm@1 20
rlm@1 21 LUAI_FUNC const TValue *luaH_getnum (Table *t, int key);
rlm@1 22 LUAI_FUNC TValue *luaH_setnum (lua_State *L, Table *t, int key);
rlm@1 23 LUAI_FUNC const TValue *luaH_getstr (Table *t, TString *key);
rlm@1 24 LUAI_FUNC TValue *luaH_setstr (lua_State *L, Table *t, TString *key);
rlm@1 25 LUAI_FUNC const TValue *luaH_get (Table *t, const TValue *key);
rlm@1 26 LUAI_FUNC TValue *luaH_set (lua_State *L, Table *t, const TValue *key);
rlm@1 27 LUAI_FUNC Table *luaH_new (lua_State *L, int narray, int lnhash);
rlm@1 28 LUAI_FUNC void luaH_resizearray (lua_State *L, Table *t, int nasize);
rlm@1 29 LUAI_FUNC void luaH_free (lua_State *L, Table *t);
rlm@1 30 LUAI_FUNC int luaH_next (lua_State *L, Table *t, StkId key);
rlm@1 31 LUAI_FUNC int luaH_getn (Table *t);
rlm@1 32
rlm@1 33
rlm@1 34 #if defined(LUA_DEBUG)
rlm@1 35 LUAI_FUNC Node *luaH_mainposition (const Table *t, const TValue *key);
rlm@1 36 LUAI_FUNC int luaH_isdummy (Node *n);
rlm@1 37 #endif
rlm@1 38
rlm@1 39
rlm@1 40 #endif