hash.h 660 B

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