diff options
author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 1996-02-14 10:35:51 -0300 |
---|---|---|
committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 1996-02-14 10:35:51 -0300 |
commit | d1608c597e2f45021d43c56050aff08e5d417699 (patch) | |
tree | e6b0a07e68384cd9707e7dda6864dd8664e2ee99 /tree.h | |
parent | 0f4903a5d79fb594115c5603072d0dce77b2b84e (diff) | |
download | lua-d1608c597e2f45021d43c56050aff08e5d417699.tar.gz lua-d1608c597e2f45021d43c56050aff08e5d417699.tar.bz2 lua-d1608c597e2f45021d43c56050aff08e5d417699.zip |
reserved words are stored in main string table; "marked" field is
used to indicate its type.
Table initializations centralized by "tree.c".
Diffstat (limited to 'tree.h')
-rw-r--r-- | tree.h | 5 |
1 files changed, 2 insertions, 3 deletions
@@ -1,7 +1,7 @@ | |||
1 | /* | 1 | /* |
2 | ** tree.h | 2 | ** tree.h |
3 | ** TecCGraf - PUC-Rio | 3 | ** TecCGraf - PUC-Rio |
4 | ** $Id: tree.h,v 1.11 1996/01/26 18:03:19 roberto Exp roberto $ | 4 | ** $Id: tree.h,v 1.12 1996/02/12 18:32:40 roberto Exp roberto $ |
5 | */ | 5 | */ |
6 | 6 | ||
7 | #ifndef tree_h | 7 | #ifndef tree_h |
@@ -17,13 +17,12 @@ typedef struct TaggedString | |||
17 | unsigned short varindex; /* != NOT_USED if this is a symbol */ | 17 | unsigned short varindex; /* != NOT_USED if this is a symbol */ |
18 | unsigned short constindex; /* != NOT_USED if this is a constant */ | 18 | unsigned short constindex; /* != NOT_USED if this is a constant */ |
19 | unsigned long hash; /* 0 if not initialized */ | 19 | unsigned long hash; /* 0 if not initialized */ |
20 | char marked; /* for garbage collection; 2 means "never collect" */ | 20 | int marked; /* for garbage collection; never collect (nor change) if > 1 */ |
21 | char str[1]; /* \0 byte already reserved */ | 21 | char str[1]; /* \0 byte already reserved */ |
22 | } TaggedString; | 22 | } TaggedString; |
23 | 23 | ||
24 | 24 | ||
25 | TaggedString *lua_createstring (char *str); | 25 | TaggedString *lua_createstring (char *str); |
26 | TaggedString *luaI_createfixedstring (char *str); | ||
27 | Long lua_strcollector (void); | 26 | Long lua_strcollector (void); |
28 | 27 | ||
29 | #endif | 28 | #endif |