diff options
Diffstat (limited to 'lstring.h')
| -rw-r--r-- | lstring.h | 12 |
1 files changed, 5 insertions, 7 deletions
| @@ -1,5 +1,5 @@ | |||
| 1 | /* | 1 | /* |
| 2 | ** $Id: lstring.h,v 1.18 2000/03/10 18:37:44 roberto Exp roberto $ | 2 | ** $Id: lstring.h,v 1.19 2000/05/08 19:32:53 roberto Exp roberto $ |
| 3 | ** String table (keep all strings handled by Lua) | 3 | ** String table (keep all strings handled by Lua) |
| 4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
| 5 | */ | 5 | */ |
| @@ -12,11 +12,6 @@ | |||
| 12 | #include "lstate.h" | 12 | #include "lstate.h" |
| 13 | 13 | ||
| 14 | 14 | ||
| 15 | #define NUM_HASHSTR 32 | ||
| 16 | #define NUM_HASHUDATA 31 | ||
| 17 | #define NUM_HASHS (NUM_HASHSTR+NUM_HASHUDATA) | ||
| 18 | |||
| 19 | |||
| 20 | /* | 15 | /* |
| 21 | ** any TString with mark>=FIXMARK is never collected. | 16 | ** any TString with mark>=FIXMARK is never collected. |
| 22 | ** Marks>=RESERVEDMARK are used to identify reserved words. | 17 | ** Marks>=RESERVEDMARK are used to identify reserved words. |
| @@ -25,11 +20,14 @@ | |||
| 25 | #define RESERVEDMARK 3 | 20 | #define RESERVEDMARK 3 |
| 26 | 21 | ||
| 27 | 22 | ||
| 23 | #define gcsizestring(L, l) numblocks(L, 0, sizeof(TString)+l) | ||
| 24 | #define gcsizeudata gcsizestring(L, 0) | ||
| 25 | |||
| 26 | |||
| 28 | void luaS_init (lua_State *L); | 27 | void luaS_init (lua_State *L); |
| 29 | void luaS_resize (lua_State *L, stringtable *tb, int newsize); | 28 | void luaS_resize (lua_State *L, stringtable *tb, int newsize); |
| 30 | TString *luaS_createudata (lua_State *L, void *udata, int tag); | 29 | TString *luaS_createudata (lua_State *L, void *udata, int tag); |
| 31 | void luaS_freeall (lua_State *L); | 30 | void luaS_freeall (lua_State *L); |
| 32 | void luaS_free (lua_State *L, TString *ts); | ||
| 33 | TString *luaS_newlstr (lua_State *L, const char *str, long l); | 31 | TString *luaS_newlstr (lua_State *L, const char *str, long l); |
| 34 | TString *luaS_new (lua_State *L, const char *str); | 32 | TString *luaS_new (lua_State *L, const char *str); |
| 35 | TString *luaS_newfixed (lua_State *L, const char *str); | 33 | TString *luaS_newfixed (lua_State *L, const char *str); |
