hash.h 739 B

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