diff options
author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 1999-10-04 15:51:04 -0200 |
---|---|---|
committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 1999-10-04 15:51:04 -0200 |
commit | 4343420d4d559a7d4cdacdbc1fd61552dcf59f04 (patch) | |
tree | 57e0bdd41e2f3a4ab70d3150022569751e3d02ad /lstring.h | |
parent | 1f7103e05d01a6a4c300a73bcfc8d9b17b2c20a4 (diff) | |
download | lua-4343420d4d559a7d4cdacdbc1fd61552dcf59f04.tar.gz lua-4343420d4d559a7d4cdacdbc1fd61552dcf59f04.tar.bz2 lua-4343420d4d559a7d4cdacdbc1fd61552dcf59f04.zip |
simplified version of `gc' tag method (only for userdata now).
Diffstat (limited to 'lstring.h')
-rw-r--r-- | lstring.h | 18 |
1 files changed, 11 insertions, 7 deletions
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: lstring.h,v 1.7 1998/03/06 16:54:42 roberto Exp roberto $ | 2 | ** $Id: lstring.h,v 1.8 1999/08/16 20:52:00 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 | */ |
@@ -11,18 +11,22 @@ | |||
11 | #include "lobject.h" | 11 | #include "lobject.h" |
12 | 12 | ||
13 | 13 | ||
14 | #define NUM_HASHSTR 31 | ||
15 | #define NUM_HASHUDATA 31 | ||
16 | #define NUM_HASHS (NUM_HASHSTR+NUM_HASHUDATA) | ||
17 | |||
18 | |||
19 | extern TaggedString luaS_EMPTY; | ||
20 | |||
14 | void luaS_init (void); | 21 | void luaS_init (void); |
15 | TaggedString *luaS_createudata (void *udata, int tag); | 22 | TaggedString *luaS_createudata (void *udata, int tag); |
16 | TaggedString *luaS_collector (void); | 23 | void luaS_freeall (void); |
17 | void luaS_free (TaggedString *l); | 24 | void luaS_free (TaggedString *ts); |
18 | TaggedString *luaS_newlstr (const char *str, long l); | 25 | TaggedString *luaS_newlstr (const char *str, long l); |
19 | TaggedString *luaS_new (const char *str); | 26 | TaggedString *luaS_new (const char *str); |
20 | TaggedString *luaS_newfixedstring (const char *str); | 27 | TaggedString *luaS_newfixedstring (const char *str); |
21 | void luaS_rawsetglobal (TaggedString *ts, TObject *newval); | 28 | void luaS_rawsetglobal (TaggedString *ts, const TObject *newval); |
22 | const char *luaS_travsymbol (int (*fn)(TObject *)); | ||
23 | int luaS_globaldefined (const char *name); | 29 | int luaS_globaldefined (const char *name); |
24 | TaggedString *luaS_collectudata (void); | ||
25 | void luaS_freeall (void); | ||
26 | 30 | ||
27 | 31 | ||
28 | #endif | 32 | #endif |