hash.h 538 B

1234567891011121314151617181920212223242526272829303132
  1. /*
  2. ** hash.h
  3. ** hash manager for lua
  4. ** Luiz Henrique de Figueiredo - 17 Aug 90
  5. ** $Id: hash.h,v 1.1 1993/12/17 18:41:19 celes Exp celes $
  6. */
  7. #ifndef hash_h
  8. #define hash_h
  9. typedef struct node
  10. {
  11. Object ref;
  12. Object val;
  13. struct node *next;
  14. } Node;
  15. typedef struct Hash
  16. {
  17. char mark;
  18. unsigned int nhash;
  19. Node **list;
  20. } Hash;
  21. Hash *lua_createarray (int nhash);
  22. void lua_hashmark (Hash *h);
  23. void lua_hashcollector (void);
  24. Object *lua_hashdefine (Hash *t, Object *ref);
  25. void lua_next (void);
  26. #endif