hash.h 585 B

123456789101112131415161718192021222324252627282930313233
  1. /*
  2. ** hash.h
  3. ** hash manager for lua
  4. ** Luiz Henrique de Figueiredo - 17 Aug 90
  5. ** $Id: hash.h,v 2.2 1994/08/05 19:25:09 celes Exp celes $
  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. char mark;
  17. unsigned int nhash;
  18. unsigned int nuse;
  19. Node *node;
  20. } Hash;
  21. Hash *lua_createarray (int nhash);
  22. void lua_hashmark (Hash *h);
  23. void lua_hashcollector (void);
  24. Object *lua_hashget (Hash *t, Object *ref);
  25. Object *lua_hashdefine (Hash *t, Object *ref);
  26. void lua_next (void);
  27. #endif