Subversion Repositories Kolibri OS

Rev

Go to most recent revision | Blame | Last modification | View Log | RSS feed

  1. /*
  2. ** hash.h
  3. ** hash manager for lua
  4. ** Luiz Henrique de Figueiredo - 17 Aug 90
  5. ** Modified by Waldemar Celes Filho
  6. ** 26 Apr 93
  7. */
  8.  
  9. #ifndef hash_h
  10. #define hash_h
  11.  
  12. typedef struct node
  13. {
  14.  Object ref;
  15.  Object val;
  16.  struct node *next;
  17. } Node;
  18.  
  19. typedef struct Hash
  20. {
  21.  char           mark;
  22.  unsigned int   nhash;
  23.  Node         **list;
  24. } Hash;
  25.  
  26. #define markarray(t)            ((t)->mark)
  27.  
  28. Hash    *lua_hashcreate (unsigned int nhash);
  29. void     lua_hashdelete (Hash *h);
  30. Object  *lua_hashdefine (Hash *t, Object *ref);
  31. void     lua_hashmark   (Hash *h);
  32.  
  33. void     lua_next (void);
  34.  
  35. #endif
  36.