lstring.h 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. /*
  2. ** $Id: lstring.h,v 1.17 2000/03/10 14:38:10 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. #define NUM_HASHSTR 32
  11. #define NUM_HASHUDATA 31
  12. #define NUM_HASHS (NUM_HASHSTR+NUM_HASHUDATA)
  13. /*
  14. ** any taggedstring with mark>=FIXMARK is never collected.
  15. ** Marks>=RESERVEDMARK are used to identify reserved words.
  16. */
  17. #define FIXMARK 2
  18. #define RESERVEDMARK 3
  19. void luaS_init (lua_State *L);
  20. void luaS_resize (lua_State *L, stringtable *tb, int newsize);
  21. TString *luaS_createudata (lua_State *L, void *udata, int tag);
  22. void luaS_freeall (lua_State *L);
  23. void luaS_free (lua_State *L, TString *ts);
  24. TString *luaS_newlstr (lua_State *L, const char *str, long l);
  25. TString *luaS_new (lua_State *L, const char *str);
  26. TString *luaS_newfixed (lua_State *L, const char *str);
  27. GlobalVar *luaS_assertglobal (lua_State *L, TString *ts);
  28. GlobalVar *luaS_assertglobalbyname (lua_State *L, const char *name);
  29. int luaS_globaldefined (lua_State *L, const char *name);
  30. #endif