lstring.h 904 B

123456789101112131415161718192021222324252627282930313233343536
  1. /*
  2. ** $Id: lstring.h,v 1.22 2000/09/29 12:42:13 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 sizestring(l) (sizeof(TString)+(lint32)(l)*sizeof(char))
  17. void luaS_init (lua_State *L);
  18. void luaS_resize (lua_State *L, stringtable *tb, int newsize);
  19. TString *luaS_newudata (lua_State *L, size_t s, void *udata);
  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