tree.h 801 B

1234567891011121314151617181920212223242526272829303132
  1. /*
  2. ** tree.h
  3. ** TecCGraf - PUC-Rio
  4. ** $Id: tree.h,v 1.15 1997/02/11 11:35:05 roberto Exp roberto $
  5. */
  6. #ifndef tree_h
  7. #define tree_h
  8. #include "types.h"
  9. #define NOT_USED 0xFFFE
  10. typedef struct TaggedString
  11. {
  12. int tag; /* if != LUA_T_STRING, this is a userdata */
  13. long size;
  14. Word varindex; /* != NOT_USED if this is a symbol */
  15. Word constindex; /* != NOT_USED if this is a constant */
  16. unsigned long hash; /* 0 if not initialized */
  17. int marked; /* for garbage collection; never collect (nor change) if > 1 */
  18. char str[1]; /* \0 byte already reserved; MAY BE NOT 0 TERMINATED!! */
  19. } TaggedString;
  20. TaggedString *lua_createstring (char *str);
  21. TaggedString *luaI_createuserdata (char *buff, long size, int tag);
  22. Long lua_strcollector (void);
  23. void luaI_strcallIM (void);
  24. #endif