hash.h 695 B

1234567891011121314151617181920212223242526272829303132333435363738
  1. /*
  2. ** hash.h
  3. ** hash manager for lua
  4. ** $Id: hash.h,v 2.11 1996/03/08 12:04:04 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. {
  12. Object ref;
  13. Object val;
  14. } Node;
  15. typedef struct Hash
  16. {
  17. struct Hash *next;
  18. Node *node;
  19. int nhash;
  20. int nuse;
  21. char mark;
  22. } Hash;
  23. int lua_equalObj (Object *t1, Object *t2);
  24. int luaI_redimension (int nhash);
  25. Hash *lua_createarray (int nhash);
  26. void lua_hashmark (Hash *h);
  27. Long lua_hashcollector (void);
  28. Object *lua_hashget (Hash *t, Object *ref);
  29. Object *lua_hashdefine (Hash *t, Object *ref);
  30. void lua_next (void);
  31. #endif