hash.h 679 B

12345678910111213141516171819202122232425262728293031323334353637
  1. /*
  2. ** hash.h
  3. ** hash manager for lua
  4. ** Luiz Henrique de Figueiredo - 17 Aug 90
  5. ** $Id: hash.h,v 2.7 1994/12/20 21:20:36 roberto Exp roberto $
  6. */
  7. #ifndef hash_h
  8. #define hash_h
  9. #include "types.h"
  10. typedef struct node
  11. {
  12. Object ref;
  13. Object val;
  14. } Node;
  15. typedef struct Hash
  16. {
  17. struct Hash *next;
  18. char mark;
  19. Word nhash;
  20. Word nuse;
  21. Node *node;
  22. } Hash;
  23. Bool lua_equalObj (Object *t1, Object *t2);
  24. Hash *lua_createarray (Word nhash);
  25. void lua_hashmark (Hash *h);
  26. Long lua_hashcollector (void);
  27. Object *lua_hashget (Hash *t, Object *ref);
  28. Object *lua_hashdefine (Hash *t, Object *ref);
  29. void lua_next (void);
  30. #endif