ltable.h 631 B

12345678910111213141516171819202122232425262728
  1. /*
  2. ** $Id: ltable.h,v 1.7 1998/12/30 13:14:46 roberto Exp $
  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 ref(n) (&(n)->ref)
  11. #define val(n) (&(n)->val)
  12. #define nhash(t) ((t)->nhash)
  13. Hash *luaH_new (int nhash);
  14. void luaH_free (Hash *frees);
  15. TObject *luaH_get (Hash *t, TObject *ref);
  16. TObject *luaH_set (Hash *t, TObject *ref);
  17. Node *luaH_next (Hash *t, TObject *r);
  18. void luaH_setint (Hash *t, int ref, TObject *val);
  19. TObject *luaH_getint (Hash *t, int ref);
  20. void luaH_move (Hash *t, int from, int to);
  21. #endif