diff options
author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2002-11-07 13:37:10 -0200 |
---|---|---|
committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2002-11-07 13:37:10 -0200 |
commit | dff9be4224a1cd0f338b544b9e01d42f0f4e537f (patch) | |
tree | 1dc8846da882dd37d9f420c10ea545ce92fb3b8a /lobject.h | |
parent | 118347d8c3b83ea0291918e81c5367937316fabb (diff) | |
download | lua-dff9be4224a1cd0f338b544b9e01d42f0f4e537f.tar.gz lua-dff9be4224a1cd0f338b544b9e01d42f0f4e537f.tar.bz2 lua-dff9be4224a1cd0f338b544b9e01d42f0f4e537f.zip |
new macros to distinguish different types of object moves (for future GC
evolution).
Diffstat (limited to 'lobject.h')
-rw-r--r-- | lobject.h | 19 |
1 files changed, 18 insertions, 1 deletions
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: lobject.h,v 1.150 2002/10/25 20:05:28 roberto Exp roberto $ | 2 | ** $Id: lobject.h,v 1.151 2002/11/04 12:31:44 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 | */ |
@@ -132,6 +132,7 @@ typedef struct lua_TObject { | |||
132 | #define setnilvalue(obj) ((obj)->tt=LUA_TNIL) | 132 | #define setnilvalue(obj) ((obj)->tt=LUA_TNIL) |
133 | 133 | ||
134 | 134 | ||
135 | |||
135 | /* | 136 | /* |
136 | ** for internal debug only | 137 | ** for internal debug only |
137 | */ | 138 | */ |
@@ -144,6 +145,22 @@ typedef struct lua_TObject { | |||
144 | checkconsistency(o2); \ | 145 | checkconsistency(o2); \ |
145 | o1->tt=o2->tt; o1->value = o2->value; } | 146 | o1->tt=o2->tt; o1->value = o2->value; } |
146 | 147 | ||
148 | |||
149 | /* | ||
150 | ** different types of sets, according to destination | ||
151 | */ | ||
152 | |||
153 | /* from stack to (same) stack */ | ||
154 | #define setobjs2s setobj | ||
155 | /* to stack (not from same stack) */ | ||
156 | #define setobj2s setobj | ||
157 | /* from table to same table */ | ||
158 | #define setobjt2t setobj | ||
159 | /* to table */ | ||
160 | #define setobj2t setobj | ||
161 | /* string to stack */ | ||
162 | #define setsvalue2s setsvalue | ||
163 | |||
147 | #define setttype(obj, tt) (ttype(obj) = (tt)) | 164 | #define setttype(obj, tt) (ttype(obj) = (tt)) |
148 | 165 | ||
149 | 166 | ||