hash.h 752 B

123456789101112131415161718192021222324252627282930313233343536373839
  1. /*
  2. ** hash.h
  3. ** hash manager for lua
  4. ** $Id: hash.h,v 2.15 1997/03/31 14:02:58 roberto Exp roberto $
  5. */
  6. #ifndef hash_h
  7. #define hash_h
  8. #include "types.h"
  9. #include "opcode.h"
  10. typedef struct node {
  11. TObject ref;
  12. TObject val;
  13. } Node;
  14. typedef struct Hash {
  15. struct Hash *next;
  16. Node *node;
  17. int nhash;
  18. int nuse;
  19. int htag;
  20. char mark;
  21. } Hash;
  22. int lua_equalObj (TObject *t1, TObject *t2);
  23. int luaI_redimension (int nhash);
  24. Hash *lua_createarray (int nhash);
  25. void lua_hashmark (Hash *h);
  26. Hash *luaI_hashcollector (long *count);
  27. void luaI_hashcallIM (Hash *l);
  28. void luaI_hashfree (Hash *frees);
  29. TObject *lua_hashget (Hash *t, TObject *ref);
  30. TObject *lua_hashdefine (Hash *t, TObject *ref);
  31. void lua_next (void);
  32. #endif