diff options
author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 1994-11-23 12:32:00 -0200 |
---|---|---|
committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 1994-11-23 12:32:00 -0200 |
commit | d490555ec9d5efb886211f735694d4e7dd0c166d (patch) | |
tree | f9b75cdc3a6d4132dddc884280ae218a7f9beb5c /opcode.h | |
parent | ad0ec203f60df5e2f8a3b294c9e8c1014280b8f1 (diff) | |
download | lua-d490555ec9d5efb886211f735694d4e7dd0c166d.tar.gz lua-d490555ec9d5efb886211f735694d4e7dd0c166d.tar.bz2 lua-d490555ec9d5efb886211f735694d4e7dd0c166d.zip |
garbage collection tag for strings organized in struct TaggedString
Diffstat (limited to 'opcode.h')
-rw-r--r-- | opcode.h | 8 |
1 files changed, 5 insertions, 3 deletions
@@ -1,12 +1,13 @@ | |||
1 | /* | 1 | /* |
2 | ** TeCGraf - PUC-Rio | 2 | ** TeCGraf - PUC-Rio |
3 | ** $Id: opcode.h,v 3.7 1994/11/10 17:11:52 roberto Exp roberto $ | 3 | ** $Id: opcode.h,v 3.8 1994/11/10 17:36:54 roberto Exp roberto $ |
4 | */ | 4 | */ |
5 | 5 | ||
6 | #ifndef opcode_h | 6 | #ifndef opcode_h |
7 | #define opcode_h | 7 | #define opcode_h |
8 | 8 | ||
9 | #include "lua.h" | 9 | #include "lua.h" |
10 | #include "tree.h" | ||
10 | 11 | ||
11 | #ifndef STACKGAP | 12 | #ifndef STACKGAP |
12 | #define STACKGAP 128 | 13 | #define STACKGAP 128 |
@@ -109,7 +110,7 @@ typedef union | |||
109 | { | 110 | { |
110 | Cfunction f; | 111 | Cfunction f; |
111 | real n; | 112 | real n; |
112 | char *s; | 113 | TaggedString *ts; |
113 | Byte *b; | 114 | Byte *b; |
114 | struct Hash *a; | 115 | struct Hash *a; |
115 | void *u; | 116 | void *u; |
@@ -129,7 +130,8 @@ typedef struct | |||
129 | /* Macros to access structure members */ | 130 | /* Macros to access structure members */ |
130 | #define tag(o) ((o)->tag) | 131 | #define tag(o) ((o)->tag) |
131 | #define nvalue(o) ((o)->value.n) | 132 | #define nvalue(o) ((o)->value.n) |
132 | #define svalue(o) ((o)->value.s) | 133 | #define svalue(o) ((o)->value.ts->str) |
134 | #define tsvalue(o) ((o)->value.ts) | ||
133 | #define bvalue(o) ((o)->value.b) | 135 | #define bvalue(o) ((o)->value.b) |
134 | #define avalue(o) ((o)->value.a) | 136 | #define avalue(o) ((o)->value.a) |
135 | #define fvalue(o) ((o)->value.f) | 137 | #define fvalue(o) ((o)->value.f) |