summaryrefslogtreecommitdiff
path: root/tree.h
diff options
context:
space:
mode:
Diffstat (limited to 'tree.h')
-rw-r--r--tree.h16
1 files changed, 10 insertions, 6 deletions
diff --git a/tree.h b/tree.h
index 15b77b5f..0b501918 100644
--- a/tree.h
+++ b/tree.h
@@ -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.16 1997/03/19 19:41:10 roberto Exp roberto $ 4** $Id: tree.h,v 1.17 1997/05/14 18:38:29 roberto Exp roberto $
5*/ 5*/
6 6
7#ifndef tree_h 7#ifndef tree_h
@@ -16,17 +16,21 @@ typedef struct TaggedString
16{ 16{
17 int tag; /* if != LUA_T_STRING, this is a userdata */ 17 int tag; /* if != LUA_T_STRING, this is a userdata */
18 struct TaggedString *next; 18 struct TaggedString *next;
19 long size; 19 union {
20 Word varindex; /* != NOT_USED if this is a symbol */ 20 struct {
21 Word constindex; /* != NOT_USED if this is a constant */ 21 Word varindex; /* != NOT_USED if this is a symbol */
22 Word constindex; /* != NOT_USED if this is a constant */
23 } s;
24 void *v; /* if this is a userdata, here is its value */
25 } u;
22 unsigned long hash; /* 0 if not initialized */ 26 unsigned long hash; /* 0 if not initialized */
23 int marked; /* for garbage collection; never collect (nor change) if > 1 */ 27 int marked; /* for garbage collection; never collect (nor change) if > 1 */
24 char str[1]; /* \0 byte already reserved; MAY BE NOT 0 TERMINATED!! */ 28 char str[1]; /* \0 byte already reserved */
25} TaggedString; 29} TaggedString;
26 30
27 31
28TaggedString *lua_createstring (char *str); 32TaggedString *lua_createstring (char *str);
29TaggedString *luaI_createuserdata (char *buff, long size, int tag); 33TaggedString *luaI_createudata (void *udata, int tag);
30TaggedString *luaI_strcollector (long *cont); 34TaggedString *luaI_strcollector (long *cont);
31void luaI_strfree (TaggedString *l); 35void luaI_strfree (TaggedString *l);
32void luaI_strcallIM (TaggedString *l); 36void luaI_strcallIM (TaggedString *l);