hash.h 708 B

1234567891011121314151617181920212223242526272829303132333435363738
  1. /*
  2. ** hash.h
  3. ** hash manager for lua
  4. ** $Id: hash.h,v 2.14 1997/03/19 19:41:10 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. Long lua_hashcollector (void);
  27. void luaI_hashcallIM (void);
  28. TObject *lua_hashget (Hash *t, TObject *ref);
  29. TObject *lua_hashdefine (Hash *t, TObject *ref);
  30. void lua_next (void);
  31. #endif