ltable.h 812 B

12345678910111213141516171819202122232425262728293031
  1. /*
  2. ** $Id: ltable.h,v 1.42 2002/05/27 20:35:40 roberto Exp roberto $
  3. ** Lua tables (hash)
  4. ** See Copyright Notice in lua.h
  5. */
  6. #ifndef ltable_h
  7. #define ltable_h
  8. #include "lobject.h"
  9. #define node(t,i) (&(t)->node[i])
  10. #define key(n) (&(n)->i_key)
  11. #define val(n) (&(n)->i_val)
  12. const TObject *luaH_getnum (Table *t, int key);
  13. TObject *luaH_setnum (lua_State *L, Table *t, int key);
  14. const TObject *luaH_getstr (Table *t, TString *key);
  15. const TObject *luaH_get (Table *t, const TObject *key);
  16. TObject *luaH_set (lua_State *L, Table *t, const TObject *key);
  17. Table *luaH_new (lua_State *L, int narray, int lnhash);
  18. void luaH_free (lua_State *L, Table *t);
  19. int luaH_next (lua_State *L, Table *t, StkId key);
  20. /* exported only for debugging */
  21. Node *luaH_mainposition (const Table *t, const TObject *key);
  22. #endif