Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007 #ifndef ltable_h
00008 #define ltable_h
00009
00010 #include "lobject.h"
00011
00012
00013 #define gnode(t,i) (&(t)->node[i])
00014 #define gkey(n) (&(n)->i_key.tvk)
00015 #define gval(n) (&(n)->i_val)
00016 #define gnext(n) ((n)->i_key.nk.next)
00017
00018 #define invalidateTMcache(t) ((t)->flags = 0)
00019
00020
00021 LUAI_FUNC const TValue *luaH_getint (Table *t, int key);
00022 LUAI_FUNC void luaH_setint (lua_State *L, Table *t, int key, TValue *value);
00023 LUAI_FUNC const TValue *luaH_getstr (Table *t, TString *key);
00024 LUAI_FUNC const TValue *luaH_get (Table *t, const TValue *key);
00025 LUAI_FUNC TValue *luaH_newkey (lua_State *L, Table *t, const TValue *key);
00026 LUAI_FUNC TValue *luaH_set (lua_State *L, Table *t, const TValue *key);
00027 LUAI_FUNC Table *luaH_new (lua_State *L);
00028 LUAI_FUNC void luaH_resize (lua_State *L, Table *t, int nasize, int nhsize);
00029 LUAI_FUNC void luaH_resizearray (lua_State *L, Table *t, int nasize);
00030 LUAI_FUNC void luaH_free (lua_State *L, Table *t);
00031 LUAI_FUNC int luaH_next (lua_State *L, Table *t, StkId key);
00032 LUAI_FUNC int luaH_getn (Table *t);
00033
00034
00035 #if defined(LUA_DEBUG)
00036 LUAI_FUNC Node *luaH_mainposition (const Table *t, const TValue *key);
00037 LUAI_FUNC int luaH_isdummy (Node *n);
00038 #endif
00039
00040
00041 #endif