diff options
Diffstat (limited to 'lobject.h')
-rw-r--r-- | lobject.h | 24 |
1 files changed, 9 insertions, 15 deletions
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: lobject.h,v 1.29 1999/08/16 20:52:00 roberto Exp roberto $ | 2 | ** $Id: lobject.h,v 1.30 1999/09/06 20:34:18 roberto Exp roberto $ |
3 | ** Type definitions for Lua objects | 3 | ** Type definitions for Lua objects |
4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
5 | */ | 5 | */ |
@@ -86,20 +86,12 @@ typedef struct TObject { | |||
86 | 86 | ||
87 | 87 | ||
88 | /* | 88 | /* |
89 | ** generic header for garbage collector lists | ||
90 | */ | ||
91 | typedef struct GCnode { | ||
92 | struct GCnode *next; | ||
93 | int marked; | ||
94 | } GCnode; | ||
95 | |||
96 | |||
97 | /* | ||
98 | ** String headers for string table | 89 | ** String headers for string table |
99 | */ | 90 | */ |
100 | 91 | ||
101 | typedef struct TaggedString { | 92 | typedef struct TaggedString { |
102 | GCnode head; | 93 | struct TaggedString *next; |
94 | int marked; | ||
103 | unsigned long hash; | 95 | unsigned long hash; |
104 | int constindex; /* hint to reuse constants (= -1 if this is a userdata) */ | 96 | int constindex; /* hint to reuse constants (= -1 if this is a userdata) */ |
105 | union { | 97 | union { |
@@ -122,7 +114,8 @@ typedef struct TaggedString { | |||
122 | ** Function Prototypes | 114 | ** Function Prototypes |
123 | */ | 115 | */ |
124 | typedef struct TProtoFunc { | 116 | typedef struct TProtoFunc { |
125 | GCnode head; | 117 | struct TProtoFunc *next; |
118 | int marked; | ||
126 | struct TObject *consts; | 119 | struct TObject *consts; |
127 | int nconsts; | 120 | int nconsts; |
128 | Byte *code; /* ends with opcode ENDCODE */ | 121 | Byte *code; /* ends with opcode ENDCODE */ |
@@ -157,7 +150,8 @@ typedef struct LocVar { | |||
157 | ** Closures | 150 | ** Closures |
158 | */ | 151 | */ |
159 | typedef struct Closure { | 152 | typedef struct Closure { |
160 | GCnode head; | 153 | struct Closure *next; |
154 | int marked; | ||
161 | int nelems; /* not included the first one (always the prototype) */ | 155 | int nelems; /* not included the first one (always the prototype) */ |
162 | TObject consts[1]; /* at least one for prototype */ | 156 | TObject consts[1]; /* at least one for prototype */ |
163 | } Closure; | 157 | } Closure; |
@@ -170,7 +164,8 @@ typedef struct node { | |||
170 | } Node; | 164 | } Node; |
171 | 165 | ||
172 | typedef struct Hash { | 166 | typedef struct Hash { |
173 | GCnode head; | 167 | struct Hash *next; |
168 | int marked; | ||
174 | Node *node; | 169 | Node *node; |
175 | int nhash; | 170 | int nhash; |
176 | int nuse; | 171 | int nuse; |
@@ -189,7 +184,6 @@ extern const TObject luaO_nilobject; | |||
189 | : luaO_equalval(t1,t2)) | 184 | : luaO_equalval(t1,t2)) |
190 | int luaO_equalval (const TObject *t1, const TObject *t2); | 185 | int luaO_equalval (const TObject *t1, const TObject *t2); |
191 | int luaO_redimension (int oldsize); | 186 | int luaO_redimension (int oldsize); |
192 | void luaO_insertlist (GCnode *root, GCnode *node); | ||
193 | int luaO_str2d (const char *s, real *result); | 187 | int luaO_str2d (const char *s, real *result); |
194 | 188 | ||
195 | #ifdef OLD_ANSI | 189 | #ifdef OLD_ANSI |