hash.h 607 B

12345678910111213141516171819202122232425262728293031323334
  1. /*
  2. ** hash.h
  3. ** hash manager for lua
  4. ** Luiz Henrique de Figueiredo - 17 Aug 90
  5. ** $Id: hash.h,v 2.3 1994/08/09 11:24:45 celes Exp celes $
  6. */
  7. #ifndef hash_h
  8. #define hash_h
  9. typedef struct node
  10. {
  11. Object ref;
  12. Object val;
  13. } Node;
  14. typedef struct Hash
  15. {
  16. struct Hash *next;
  17. char mark;
  18. unsigned int nhash;
  19. unsigned int nuse;
  20. Node *node;
  21. } Hash;
  22. Hash *lua_createarray (int nhash);
  23. void lua_hashmark (Hash *h);
  24. void lua_hashcollector (void);
  25. Object *lua_hashget (Hash *t, Object *ref);
  26. Object *lua_hashdefine (Hash *t, Object *ref);
  27. void lua_next (void);
  28. #endif