lstring.h 895 B

123456789101112131415161718192021222324252627282930313233343536
  1. /*
  2. ** $Id: lstring.h,v 1.20 2000/05/10 16:33:20 roberto Exp roberto $
  3. ** String table (keep all strings handled by Lua)
  4. ** See Copyright Notice in lua.h
  5. */
  6. #ifndef lstring_h
  7. #define lstring_h
  8. #include "lobject.h"
  9. #include "lstate.h"
  10. /*
  11. ** any TString with mark>=FIXMARK is never collected.
  12. ** Marks>=RESERVEDMARK are used to identify reserved words.
  13. */
  14. #define FIXMARK 2
  15. #define RESERVEDMARK 3
  16. #define gcsizestring(L, l) numblocks(L, 0, sizeof(TString)+l)
  17. #define gcsizeudata gcsizestring(L, 0)
  18. void luaS_init (lua_State *L);
  19. void luaS_resize (lua_State *L, stringtable *tb, int newsize);
  20. TString *luaS_createudata (lua_State *L, void *udata, int tag);
  21. void luaS_freeall (lua_State *L);
  22. TString *luaS_newlstr (lua_State *L, const char *str, size_t l);
  23. TString *luaS_new (lua_State *L, const char *str);
  24. TString *luaS_newfixed (lua_State *L, const char *str);
  25. #endif